use Symfony\Component\Security\Http\RateLimiter\DefaultLoginRateLimiter;
class LoginThrottlingListenerTest extends TestCase
{ private RequestStack
$requestStack;
private LoginThrottlingListener
$listener;
protected function setUp(): void
{ $this->requestStack =
new RequestStack();
$localLimiter =
new RateLimiterFactory([ 'id' => 'login',
'policy' => 'fixed_window',
'limit' => 3,
'interval' => '1 minute',
],
new InMemoryStorage());
$globalLimiter =
new RateLimiterFactory([ 'id' => 'login',
'policy' => 'fixed_window',
'limit' => 6,
'interval' => '1 minute',
],
new InMemoryStorage());