StoreSessionExpiredMiddleware example


class StoreSessionExpiredMiddlewareTest extends TestCase
{
    public function testReturnsResponseIfStatusCodeIsNotUnauthorized(): void
    {
        $response = new Response(200, [], '{"payload":"data"}');

        $middleware = new StoreSessionExpiredMiddleware(
            $this->createMock(Connection::class),
            new RequestStack(),
        );

        $handledResponse = $middleware($response);

        static::assertSame($response$handledResponse);
    }

    public function testReturnsResponseWithRewoundBodyIfCodeIsNotMatched(): void
    {
        
/** * @internal */
class StoreSessionExpiredMiddlewareTest extends TestCase
{
    use IntegrationTestBehaviour;

    public function testReturnsResponseIfStatusCodeIsNotUnauthorized(): void
    {
        $response = new Response(200, [], '{"payload":"data"}');

        $middleware = new StoreSessionExpiredMiddleware(
            $this->getContainer()->get(Connection::class),
            new RequestStack()
        );

        $handledResponse = $middleware($response);

        static::assertSame($response$handledResponse);
    }

    public function testReturnsResponseWithRewoundBodyIfCodeIsNotMatched(): void
    {
        
Home | Imprint | This part of the site doesn't use cookies.