Skip to content

Commit 1ac9d1a

Browse files
committed
Improve coverage
1 parent 530f49b commit 1ac9d1a

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;
@@ -404,6 +407,7 @@ private function getContainerBuilderProphecy()
404407
'api_platform.http_cache.purger.varnish',
405408
'api_platform.http_cache.purger.varnish_client',
406409
'api_platform.http_cache.listener.response.add_tags',
410+
'api_platform.http_cache.purger.varnish_client.test'
407411
];
408412

409413
foreach ($definitions as $definition) {
@@ -426,6 +430,7 @@ private function getContainerBuilderProphecy()
426430
'api_platform.property_accessor' => 'property_accessor',
427431
'api_platform.property_info' => 'property_info',
428432
'api_platform.serializer' => 'serializer',
433+
'api_platform.http_cache.purger' => 'api_platform.http_cache.purger.varnish',
429434
];
430435

431436
foreach ($aliases as $alias => $service) {
@@ -434,6 +439,7 @@ private function getContainerBuilderProphecy()
434439

435440
$containerBuilderProphecy->getParameter('kernel.debug')->willReturn(false);
436441
$containerBuilderProphecy->getParameter('api_platform.api_resources_directory')->willReturn('Entity');
442+
$containerBuilderProphecy->getDefinition('api_platform.http_cache.purger.varnish')->willReturn(new Definition());
437443

438444
return $containerBuilderProphecy;
439445
}

0 commit comments

Comments
 (0)