Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf39d2ae

Browse files
committed
[RateLimiter] Add unittest for createFromPreviousWindow with a long expired window
1 parent16a3f0c commitf39d2ae

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

‎src/Symfony/Component/RateLimiter/Tests/Strategy/SlidingWindowTest.php‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,4 +62,14 @@ public function testLongInterval()
6262
sleep(30);
6363
$this->assertSame(0,$new->getHitCount());
6464
}
65+
66+
publicfunctiontestLongIntervalCreate()
67+
{
68+
ClockMock::register(SlidingWindow::class);
69+
$window =newSlidingWindow('foo',60);
70+
71+
sleep(300);
72+
$new = SlidingWindow::createFromPreviousWindow($window,60);
73+
$this->assertFalse($new->isExpired());
74+
}
6575
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp