diff --git a/test/phpunit/UlidTest.php b/test/phpunit/UlidTest.php index eac5e51..3673083 100644 --- a/test/phpunit/UlidTest.php +++ b/test/phpunit/UlidTest.php @@ -9,10 +9,11 @@ public function testGetPrefix():void { $sut = new Ulid("customer"); self::assertStringStartsWith("CUSTOMER_", $sut); } + public function testGetTimestamp():void { $sut = new Ulid(); - $timestamp = round(microtime(true) * 1000); - self::assertSame(round($timestamp), round($sut->getTimestamp())); + $now = round(microtime(true) * 1000); + self::assertSame(round($now / 10), round($sut->getTimestamp() / 10)); } public function testGetTimestamp_setInConstructor():void {