$errorContent =
$crawler->
filterXPath('//div[@class="alert-content"]'
)->
text();
static::
assertStringContainsString($this->translator->
trans('error.rateLimitExceeded',
['%seconds%' => 5
]),
$errorContent);
} public function testResetAccountOrderRateLimit(): void
{ $orderRoute =
new OrderRoute( $this->
getContainer()->
get('order.repository'
),
$this->
getContainer()->
get('promotion.repository'
),
$this->
mockResetLimiter([ RateLimiter::GUEST_LOGIN => 1,
]),
);
$order =
$this->
createCustomerWithOrder();
$controller =
new AccountOrderPageLoader( $this->
createMock(GenericPageLoader::
class),
$this->
createMock(EventDispatcher::
class),
$orderRoute,
$this->
createMock(AccountService::
class),
);