8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ca4f93c commit 5669336Copy full SHA for 5669336
src/Symfony/Component/RateLimiter/Tests/Policy/SlidingWindowTest.php
@@ -34,6 +34,9 @@ public function testGetExpirationTime()
34
35
$new = SlidingWindow::createFromPreviousWindow($cachedWindow, 15);
36
$this->assertSame(2 * 15, $new->getExpirationTime());
37
+
38
+ usleep(10.1);
39
+ $this->assertIsInt($new->getExpirationTime());
40
}
41
42
public function testInvalidInterval()
@@ -90,7 +93,6 @@ public function testIsExpiredUsesMicrotime()
90
93
{
91
94
ClockMock::register(SlidingWindow::class);
92
95
$window = new SlidingWindow('foo', 10);
-
96
usleep(10.1 * 1e6);
97
$this->assertTrue($window->isExpired());
98
0 commit comments