Skip to content

Commit a302f83

Browse files
committed
test: add test for Time::equals() with microseconds
1 parent a37f845 commit a302f83

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/system/I18n/TimeTest.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -889,6 +889,14 @@ public function testEqualWithStringAndNoTimezone(): void
889889
$this->assertTrue($time1->equals('January 10, 2017 21:50:00'));
890890
}
891891

892+
public function testEqualWithDifferentMicroseconds(): void
893+
{
894+
$time1 = new Time('2024-01-01 12:00:00.654321');
895+
$time2 = new Time('2024-01-01 12:00:00');
896+
897+
$this->assertFalse($time1->equals($time2));
898+
}
899+
892900
public function testSameSuccess(): void
893901
{
894902
$time1 = Time::parse('January 10, 2017 21:50:00', 'America/Chicago');

0 commit comments

Comments
 (0)