| @@ 35-45 (lines=11) @@ | ||
| 32 | $this->assertHasTaggedService($container, 'fos_http_cache.event_listener.log', 'kernel.event_subscriber'); |
|
| 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->assertIsAbstract($container, 'fos_http_cache.event_listener.log'); |
|
| 45 | } |
|
| 46 | ||
| 47 | private function assertHasTaggedService(ContainerBuilder $container, $id, $tag) |
|
| 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 TagListenerPass(); |
|
| 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 | { |
|