@@ 35-45 (lines=11) @@ | ||
32 | $this->assertHasCall($container, 'fos_http_cache.cache_manager', 'addSubscriber'); |
|
33 | } |
|
34 | ||
35 | public function testNoLogger() |
|
36 | { |
|
37 | $extension = new FOSHttpCacheExtension(); |
|
38 | $loggerPass = new LoggerPass(); |
|
39 | $container = $this->createContainer(); |
|
40 | $config = $this->getConfig(); |
|
41 | $extension->load(array($config), $container); |
|
42 | $loggerPass->process($container); |
|
43 | ||
44 | $this->assertNotHasCall($container, 'fos_http_cache.cache_manager', 'addSubscriber'); |
|
45 | } |
|
46 | ||
47 | private function assertHasCall(ContainerBuilder $container, $id, $method) |
|
48 | { |
@@ 25-33 (lines=9) @@ | ||
22 | * @expectedException \RuntimeException |
|
23 | * @expectedExceptionMessage requires SensioFrameworkExtraBundle |
|
24 | */ |
|
25 | public function testNoFrameworkBundle() |
|
26 | { |
|
27 | $extension = new FOSHttpCacheExtension(); |
|
28 | $tagListenerPass = new TagSubscriberPass(); |
|
29 | $container = $this->createContainer(); |
|
30 | $config = $this->getConfig(); |
|
31 | $extension->load(array($config), $container); |
|
32 | $tagListenerPass->process($container); |
|
33 | } |
|
34 | ||
35 | protected function createContainer() |
|
36 | { |