yield 'normal' =>
[['foo'
]];
yield 'duplicate gets merged' =>
[['foo', 'foo'
]];
yield 'is-prefixed' =>
[['foo', 'foo'
], 'foo'
];
} public function testBanURL(): void
{ $this->mockHandler->
append(new GuzzleResponse(200,
[]));
$gateway =
new FastlyReverseProxyGateway($this->client, 'test', 'key', '0', 3, '', '', 'http://localhost'
);
$gateway->
ban(['/foo'
]);
$lastRequest =
$this->mockHandler->
getLastRequest();
static::
assertNotNull($lastRequest);
static::
assertSame('/purge/localhost/foo',
$lastRequest->
getRequestTarget());
static::
assertSame('POST',
$lastRequest->
getMethod());
static::
assertFalse($lastRequest->
hasHeader('surrogate-key'
));
static::
assertSame(['key'
],
$lastRequest->
getHeader('Fastly-Key'
));
} public function testBanAll(): void
{