diff --git a/tests/system/I18n/TimeTest.php b/tests/system/I18n/TimeTest.php index 287821888335..405887b6a3e8 100644 --- a/tests/system/I18n/TimeTest.php +++ b/tests/system/I18n/TimeTest.php @@ -220,7 +220,7 @@ public function testCreateFromTimestamp() public function testTestNow() { $this->assertFalse(Time::hasTestNow()); - $this->assertEquals(date('Y-m-d H:i:s', time()), Time::now()->toDateTimeString()); + $this->assertCloseEnoughString(date('Y-m-d H:i:s', time()), Time::now()->toDateTimeString()); $t = new Time('2000-01-02'); Time::setTestNow($t); @@ -229,7 +229,7 @@ public function testTestNow() $this->assertEquals('2000-01-02 00:00:00', Time::now()->toDateTimeString()); Time::setTestNow(); - $this->assertEquals(date('Y-m-d H:i:s', time()), Time::now()->toDateTimeString()); + $this->assertCloseEnoughString(date('Y-m-d H:i:s', time()), Time::now()->toDateTimeString()); } //--------------------------------------------------------------------