From 17c2006ae37bde3a9c2a5b8083f09e9bc127a8f0 Mon Sep 17 00:00:00 2001 From: Stefan Zweifel Date: Mon, 5 Feb 2024 15:41:02 +0100 Subject: [PATCH] Update Assertion --- tests/FormatTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/FormatTest.php b/tests/FormatTest.php index c92cb2a1..dd4bb4e0 100644 --- a/tests/FormatTest.php +++ b/tests/FormatTest.php @@ -17,7 +17,7 @@ it('can determine the age in days', function () { Carbon::setTestNow(Carbon::create(2016, 1, 1)->startOfDay()); - expect(Format::ageInDays(Carbon::now()))->toEqual('0.00 (1 second ago)'); + expect(Format::ageInDays(Carbon::now()->subSeconds(5)))->toEqual('0.00 (5 seconds ago)'); expect(Format::ageInDays(Carbon::now()->subHour(1)))->toEqual('0.04 (1 hour ago)'); expect(Format::ageInDays(Carbon::now()->subHour(1)->subDay(1)))->toEqual('1.04 (1 day ago)'); expect(Format::ageInDays(Carbon::now()->subHour(1)->subMonths(1)))->toEqual('30.04 (4 weeks ago)');