Skip to content

Commit 6075fa2

Browse files
committed
Improve coverage
1 parent b8625bc commit 6075fa2

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

tests/Bridge/Symfony/Bundle/DependencyInjection/ApiPlatformExtensionTest.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,10 @@ class ApiPlatformExtensionTest extends \PHPUnit_Framework_TestCase
4545
'jsonld' => ['mime_types' => ['application/ld+json']],
4646
'jsonhal' => ['mime_types' => ['application/hal+json']],
4747
],
48-
'http_cache' => ['invalidation' => ['enabled' => true]],
48+
'http_cache' => ['invalidation' => [
49+
'enabled' => true,
50+
'varnish_urls' => ['test'],
51+
]],
4952
]];
5053

5154
private $extension;
@@ -401,6 +404,7 @@ private function getContainerBuilderProphecy()
401404
'api_platform.http_cache.purger.varnish',
402405
'api_platform.http_cache.purger.varnish_client',
403406
'api_platform.http_cache.listener.response.add_tags',
407+
'api_platform.http_cache.purger.varnish_client.test'
404408
];
405409

406410
foreach ($definitions as $definition) {
@@ -423,6 +427,7 @@ private function getContainerBuilderProphecy()
423427
'api_platform.property_accessor' => 'property_accessor',
424428
'api_platform.property_info' => 'property_info',
425429
'api_platform.serializer' => 'serializer',
430+
'api_platform.http_cache.purger' => 'api_platform.http_cache.purger.varnish',
426431
];
427432

428433
foreach ($aliases as $alias => $service) {
@@ -431,6 +436,7 @@ private function getContainerBuilderProphecy()
431436

432437
$containerBuilderProphecy->getParameter('kernel.debug')->willReturn(false);
433438
$containerBuilderProphecy->getParameter('api_platform.api_resources_directory')->willReturn('Entity');
439+
$containerBuilderProphecy->getDefinition('api_platform.http_cache.purger.varnish')->willReturn(new Definition());
434440

435441
return $containerBuilderProphecy;
436442
}

0 commit comments

Comments
 (0)