@@ -45,7 +45,10 @@ class ApiPlatformExtensionTest extends \PHPUnit_Framework_TestCase
45
45
'jsonld ' => ['mime_types ' => ['application/ld+json ' ]],
46
46
'jsonhal ' => ['mime_types ' => ['application/hal+json ' ]],
47
47
],
48
- 'http_cache ' => ['invalidation ' => ['enabled ' => true ]],
48
+ 'http_cache ' => ['invalidation ' => [
49
+ 'enabled ' => true ,
50
+ 'varnish_urls ' => ['test ' ],
51
+ ]],
49
52
]];
50
53
51
54
private $ extension ;
@@ -401,6 +404,7 @@ private function getContainerBuilderProphecy()
401
404
'api_platform.http_cache.purger.varnish ' ,
402
405
'api_platform.http_cache.purger.varnish_client ' ,
403
406
'api_platform.http_cache.listener.response.add_tags ' ,
407
+ 'api_platform.http_cache.purger.varnish_client.test '
404
408
];
405
409
406
410
foreach ($ definitions as $ definition ) {
@@ -423,6 +427,7 @@ private function getContainerBuilderProphecy()
423
427
'api_platform.property_accessor ' => 'property_accessor ' ,
424
428
'api_platform.property_info ' => 'property_info ' ,
425
429
'api_platform.serializer ' => 'serializer ' ,
430
+ 'api_platform.http_cache.purger ' => 'api_platform.http_cache.purger.varnish ' ,
426
431
];
427
432
428
433
foreach ($ aliases as $ alias => $ service ) {
@@ -431,6 +436,7 @@ private function getContainerBuilderProphecy()
431
436
432
437
$ containerBuilderProphecy ->getParameter ('kernel.debug ' )->willReturn (false );
433
438
$ containerBuilderProphecy ->getParameter ('api_platform.api_resources_directory ' )->willReturn ('Entity ' );
439
+ $ containerBuilderProphecy ->getDefinition ('api_platform.http_cache.purger.varnish ' )->willReturn (new Definition ());
434
440
435
441
return $ containerBuilderProphecy ;
436
442
}
0 commit comments