Commit 2862e2ed authored by Jens Segers's avatar Jens Segers

Fix composer.json and change date manipulation

parent f5c230f8
......@@ -11,12 +11,13 @@
"license" : "MIT",
"require": {
"php": ">=5.4.0",
"illuminate/support": "4.2.x",
"illuminate/database": "4.2.x",
"illuminate/events": "4.2.x"
"illuminate/support": "4.2.x-dev",
"illuminate/container": "4.2.x-dev",
"illuminate/database": "4.2.x-dev",
"illuminate/events": "4.2.x-dev"
},
"require-dev": {
"orchestra/testbench": "dev-master",
"orchestra/testbench": "*",
"mockery/mockery": "*"
},
"autoload": {
......
......@@ -232,11 +232,6 @@ abstract class Model extends \Jenssegers\Eloquent\Model {
{
$value = (string) $value;
}
else if ($value instanceof MongoDate)
{
$value = $this->asDateTime($value)->format($this->getDateFormat());
}
}
return $attributes;
......
......@@ -332,8 +332,8 @@ class ModelTest extends TestCase {
// test custom date format for json output
$json = $user->toArray();
$this->assertEquals($user->birthday->format('l jS \of F Y h:i:s A'), $json['birthday']);
$this->assertEquals($user->created_at->format('l jS \of F Y h:i:s A'), $json['created_at']);
$this->assertEquals((string) $user->birthday, $json['birthday']);
$this->assertEquals((string) $user->created_at, $json['created_at']);
// test default date format for json output
$item = Item::create(array('name' => 'sword'));
......
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