Skip to content

Commit e10a153

Browse files
committed
[GF] Added tests for negative dates
1 parent 51b832f commit e10a153

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/ModelTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -423,6 +423,10 @@ public function testDates(): void
423423
$user = User::create(['name' => 'Jane Doe', 'birthday' => '2005-08-08']);
424424
$this->assertInstanceOf(Carbon::class, $user->birthday);
425425

426+
// test negative dates
427+
$user = User::create(['name' => 'Jane Doe', 'birthday' => '1965-08-08']);
428+
$this->assertInstanceOf(Carbon::class, $user->birthday);
429+
426430
$user = User::create(['name' => 'Jane Doe', 'entry' => ['date' => '2005-08-08']]);
427431
$this->assertInstanceOf(Carbon::class, $user->getAttribute('entry.date'));
428432

0 commit comments

Comments
 (0)