add initial solution (made with copilot)
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Core\RateLimiter\RateLimiterInterface;
|
||||
use Core\RateLimiter\InMemoryRateLimiter;
|
||||
|
||||
final class SomeControllerTest extends TestCase {
|
||||
public function testRateLimitedPath() {
|
||||
$limiter = new InMemoryRateLimiter(2, 60);
|
||||
$this->assertTrue($limiter->allow('client1'));
|
||||
$this->assertTrue($limiter->allow('client1'));
|
||||
$this->assertFalse($limiter->allow('client1'));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user