|
16 | 16 | use ApiPlatform\Api\IriConverterInterface;
|
17 | 17 | use ApiPlatform\Core\Tests\ProphecyTrait;
|
18 | 18 | use ApiPlatform\HttpCache\EventListener\AddTagsListener;
|
19 |
| -use ApiPlatform\HttpCache\Header; |
20 | 19 | use ApiPlatform\HttpCache\PurgerInterface;
|
21 | 20 | use ApiPlatform\Metadata\ApiResource;
|
22 | 21 | use ApiPlatform\Metadata\GetCollection;
|
@@ -232,7 +231,7 @@ public function testAddTagsWithXKey()
|
232 | 231 | );
|
233 | 232 |
|
234 | 233 | $purgerProphecy = $this->prophesize(PurgerInterface::class);
|
235 |
| - $purgerProphecy->getResponseHeader(['/foo' => '/foo', '/bar' => '/bar', '/dummies' => '/dummies'])->willReturn(new Header('xkey', '/foo /bar /dummies')); |
| 234 | + $purgerProphecy->getResponseHeaders(['/foo' => '/foo', '/bar' => '/bar', '/dummies' => '/dummies'])->willReturn(['xkey', '/foo /bar /dummies']); |
236 | 235 |
|
237 | 236 | $listener = new AddTagsListener($iriConverterProphecy->reveal(), $resourceMetadataCollectionFactoryProphecy->reveal(), $purgerProphecy->reveal());
|
238 | 237 | $listener->onKernelResponse($event);
|
@@ -261,7 +260,7 @@ public function testAddTagsWithoutHeader()
|
261 | 260 | );
|
262 | 261 |
|
263 | 262 | $purgerProphecy = $this->prophesize(PurgerInterface::class);
|
264 |
| - $purgerProphecy->getResponseHeader(['/foo' => '/foo', '/bar' => '/bar', '/dummies' => '/dummies'])->willReturn(null); |
| 263 | + $purgerProphecy->getResponseHeaders(['/foo' => '/foo', '/bar' => '/bar', '/dummies' => '/dummies'])->willReturn([]); |
265 | 264 |
|
266 | 265 | $listener = new AddTagsListener($iriConverterProphecy->reveal(), $resourceMetadataCollectionFactoryProphecy->reveal(), $purgerProphecy->reveal());
|
267 | 266 | $listener->onKernelResponse($event);
|
|
0 commit comments