LoginRoute example

static::assertEquals(429, $response['errors'][0]['status']);
                static::assertEquals('CHECKOUT__CUSTOMER_AUTH_THROTTLED', $response['errors'][0]['code']);
            } else {
                static::assertEquals(401, $response['errors'][0]['status']);
                static::assertEquals('Unauthorized', $response['errors'][0]['title']);
            }
        }
    }

    public function testResetRateLimitLoginRoute(): void
    {
        $route = new LoginRoute(
            $this->getContainer()->get('event_dispatcher'),
            $this->getContainer()->get(AccountService::class),
            $this->getContainer()->get('customer.repository'),
            $this->getContainer()->get(CartRestorer::class),
            $this->getContainer()->get('request_stack'),
            $this->mockResetLimiter([
                RateLimiter::LOGIN_ROUTE => 1,
            ])
        );

        $this->createCustomer('loginTest@example.com');

        
Home | Imprint | This part of the site doesn't use cookies.