We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
getTime
1 parent 651ce89 commit d0ea93fCopy full SHA for d0ea93f
tests/UuidTest.php
@@ -197,11 +197,14 @@ public function testKnownGetTime()
197
198
public function testGetTimeValid()
199
{
200
- $now = microtime(true);
201
- $uuid6 = UUID::uuid6();
202
- $uuid7 = UUID::uuid7();
203
- $this->assertEqualsWithDelta($now, UUID::getTime($uuid6), 0.001);
204
- $this->assertEqualsWithDelta($now, UUID::getTime($uuid7), 0.001);
+ for ($i = 1; $i <= 10; $i++) {
+ $now = microtime(true);
+ $uuid6 = UUID::uuid6();
+ $uuid7 = UUID::uuid7();
+ $this->assertEqualsWithDelta($now, UUID::getTime($uuid6), 0.001);
205
+ $this->assertEqualsWithDelta($now, UUID::getTime($uuid7), 0.001);
206
+ usleep(100000);
207
+ }
208
}
209
210
public function testGetTimeNull()
0 commit comments