Commit 5e6859db authored by Jens Segers's avatar Jens Segers

Add test for #110

parent 797106b4
...@@ -393,6 +393,9 @@ class ModelTest extends TestCase { ...@@ -393,6 +393,9 @@ class ModelTest extends TestCase {
$user = User::create(array('name' => 'Jane Doe', 'birthday' => '2005-08-08')); $user = User::create(array('name' => 'Jane Doe', 'birthday' => '2005-08-08'));
$this->assertInstanceOf('Carbon\Carbon', $user->birthday); $this->assertInstanceOf('Carbon\Carbon', $user->birthday);
$user = User::create(array('name' => 'Jane Doe', 'entry' => array('date' => '2005-08-08')));
$this->assertInstanceOf('Carbon\Carbon', $user->getAttribute('entry.date'));
} }
public function testIdAttribute() public function testIdAttribute()
......
...@@ -7,7 +7,7 @@ use Illuminate\Auth\Reminders\RemindableInterface; ...@@ -7,7 +7,7 @@ use Illuminate\Auth\Reminders\RemindableInterface;
class User extends Eloquent implements UserInterface, RemindableInterface { class User extends Eloquent implements UserInterface, RemindableInterface {
protected $dates = array('birthday'); protected $dates = array('birthday', 'entry.date');
protected static $unguarded = true; protected static $unguarded = true;
public function books() public function books()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment