Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
L
laravel-mongodb
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sinan
laravel-mongodb
Commits
5e6859db
Commit
5e6859db
authored
Aug 09, 2014
by
Jens Segers
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add test for #110
parent
797106b4
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
1 deletion
+4
-1
ModelTest.php
tests/ModelTest.php
+3
-0
User.php
tests/models/User.php
+1
-1
No files found.
tests/ModelTest.php
View file @
5e6859db
...
...
@@ -393,6 +393,9 @@ class ModelTest extends TestCase {
$user
=
User
::
create
(
array
(
'name'
=>
'Jane Doe'
,
'birthday'
=>
'2005-08-08'
));
$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
()
...
...
tests/models/User.php
View file @
5e6859db
...
...
@@ -7,7 +7,7 @@ use Illuminate\Auth\Reminders\RemindableInterface;
class
User
extends
Eloquent
implements
UserInterface
,
RemindableInterface
{
protected
$dates
=
array
(
'birthday'
);
protected
$dates
=
array
(
'birthday'
,
'entry.date'
);
protected
static
$unguarded
=
true
;
public
function
books
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment