Commit 64089649 authored by Giacomo Fabbian's avatar Giacomo Fabbian

[GF] Added tests for negative dates

parent 3f5b1dc5
......@@ -423,6 +423,10 @@ class ModelTest extends TestCase
$user = User::create(['name' => 'Jane Doe', 'birthday' => '2005-08-08']);
$this->assertInstanceOf(Carbon::class, $user->birthday);
// test negative dates
$user = User::create(['name' => 'Jane Doe', 'birthday' => '1965-08-08']);
$this->assertInstanceOf(Carbon::class, $user->birthday);
$user = User::create(['name' => 'Jane Doe', 'entry' => ['date' => '2005-08-08']]);
$this->assertInstanceOf(Carbon::class, $user->getAttribute('entry.date'));
......
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