Skip to content

Commit 9b5fba5

Browse files
committed
Update Assertion for Laravel 11
1 parent 4cc9eb3 commit 9b5fba5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/FormatTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
it('can determine the age in days', function () {
1818
Carbon::setTestNow(Carbon::create(2016, 1, 1)->startOfDay());
1919

20-
expect(Format::ageInDays(Carbon::now()))->toEqual('0.00 (1 second ago)');
20+
expect(Format::ageInDays(Carbon::now()))->toEqual(((float)app()->version()) >= 11.0 ? '0.00 (0 seconds ago)' : '0.00 (1 second ago)');
2121
expect(Format::ageInDays(Carbon::now()->subHour(1)))->toEqual('0.04 (1 hour ago)');
2222
expect(Format::ageInDays(Carbon::now()->subHour(1)->subDay(1)))->toEqual('1.04 (1 day ago)');
2323
expect(Format::ageInDays(Carbon::now()->subHour(1)->subMonths(1)))->toEqual('30.04 (4 weeks ago)');

0 commit comments

Comments
 (0)