<?php
namespace Tests\Unit;

use PHPUnit\Framework\TestCase;
use Api\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'));
    }
}
