ReverseProxyCacheClearer example

$this->mockHandler->append(new Response(200));

        $this->gateway = new RedisReverseProxyGateway(
            ['http://localhost'],
            ['method' => 'BAN', 'headers' => []],
            ['method' => 'PURGE', 'headers' => [], 'urls' => ['/']],
            3,
            $this->createMock(\Redis::class),
            $this->client
        );

        $clearer = new ReverseProxyCacheClearer($this->gateway);
        $clearer->clear('noop');

        static::assertInstanceOf(RequestInterface::class$this->mockHandler->getLastRequest());

        static::assertSame('PURGE', $this->mockHandler->getLastRequest()->getMethod());
        static::assertSame('/', $this->mockHandler->getLastRequest()->getRequestTarget());
        static::assertFalse($this->mockHandler->getLastRequest()->hasHeader('foo'));
    }

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