diff --git a/tests/src/Limiters/PasswordStuffingLimiterTest.php b/tests/src/Limiters/PasswordStuffingLimiterTest.php index 8fed632..e550692 100644 --- a/tests/src/Limiters/PasswordStuffingLimiterTest.php +++ b/tests/src/Limiters/PasswordStuffingLimiterTest.php @@ -25,7 +25,7 @@ protected function getLimiter(array $config): UserPassBaseLimiter public function testKeyVariesWithWindow(): void { $config = [ - 'window' => 'PT2S' + 'window' => 'PT3S' ]; $limiter = $this->getLimiter($config); @@ -38,6 +38,7 @@ public function testKeyVariesWithWindow(): void $this->assertEquals($result, $limiter->getRateLimitKey('abc', $password)); $this->sleepTillNextWindow($startingWindow, $limiter); + $this->waitTillWindowHasAtLeastMinTime($limiter, 1); // Next window should have different keys $newKey = $limiter->getRateLimitKey('efg', $password); $this->assertNotEquals($result, $newKey, 'Key should vary with window');