Skip to content

Commit 5e6859d

Browse files
committed
Add test for #110
1 parent 797106b commit 5e6859d

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

tests/ModelTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,9 @@ public function testDates()
393393

394394
$user = User::create(array('name' => 'Jane Doe', 'birthday' => '2005-08-08'));
395395
$this->assertInstanceOf('Carbon\Carbon', $user->birthday);
396+
397+
$user = User::create(array('name' => 'Jane Doe', 'entry' => array('date' => '2005-08-08')));
398+
$this->assertInstanceOf('Carbon\Carbon', $user->getAttribute('entry.date'));
396399
}
397400

398401
public function testIdAttribute()

tests/models/User.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
class User extends Eloquent implements UserInterface, RemindableInterface {
99

10-
protected $dates = array('birthday');
10+
protected $dates = array('birthday', 'entry.date');
1111
protected static $unguarded = true;
1212

1313
public function books()

0 commit comments

Comments
 (0)