static::
assertSame('foo bla sw-1234',
$resp->headers->
get('surrogate-key'
));
} /**
* @param string[] $tags
*
* @dataProvider providerTags
*/
public function testInvalidate(array
$tags, string
$prefix = ''
): void
{ $this->mockHandler->
append(new GuzzleResponse(200,
[]));
$gateway =
new FastlyReverseProxyGateway($this->client, 'test', 'key', '0', 3,
$prefix, '', 'http://localhost'
);
$gateway->
invalidate($tags);
$gateway->
flush();
$lastRequest =
$this->mockHandler->
getLastRequest();
static::
assertNotNull($lastRequest);
static::
assertSame('/service/test/purge',
$lastRequest->
getRequestTarget());
static::
assertSame([$prefix . 'foo'
],
$lastRequest->
getHeader('surrogate-key'
));
static::
assertSame(['key'
],
$lastRequest->
getHeader('Fastly-Key'
));