Skip to content

Commit 2862e2e

Browse files
committed
Fix composer.json and change date manipulation
1 parent f5c230f commit 2862e2e

File tree

3 files changed

+7
-11
lines changed

3 files changed

+7
-11
lines changed

composer.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,13 @@
1111
"license" : "MIT",
1212
"require": {
1313
"php": ">=5.4.0",
14-
"illuminate/support": "4.2.x",
15-
"illuminate/database": "4.2.x",
16-
"illuminate/events": "4.2.x"
14+
"illuminate/support": "4.2.x-dev",
15+
"illuminate/container": "4.2.x-dev",
16+
"illuminate/database": "4.2.x-dev",
17+
"illuminate/events": "4.2.x-dev"
1718
},
1819
"require-dev": {
19-
"orchestra/testbench": "dev-master",
20+
"orchestra/testbench": "*",
2021
"mockery/mockery": "*"
2122
},
2223
"autoload": {

src/Jenssegers/Mongodb/Model.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -232,11 +232,6 @@ public function attributesToArray()
232232
{
233233
$value = (string) $value;
234234
}
235-
236-
else if ($value instanceof MongoDate)
237-
{
238-
$value = $this->asDateTime($value)->format($this->getDateFormat());
239-
}
240235
}
241236

242237
return $attributes;

tests/ModelTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -332,8 +332,8 @@ public function testDates()
332332

333333
// test custom date format for json output
334334
$json = $user->toArray();
335-
$this->assertEquals($user->birthday->format('l jS \of F Y h:i:s A'), $json['birthday']);
336-
$this->assertEquals($user->created_at->format('l jS \of F Y h:i:s A'), $json['created_at']);
335+
$this->assertEquals((string) $user->birthday, $json['birthday']);
336+
$this->assertEquals((string) $user->created_at, $json['created_at']);
337337

338338
// test default date format for json output
339339
$item = Item::create(array('name' => 'sword'));

0 commit comments

Comments
 (0)