/** * @expectedException \Symfony\Component\Config\Definition\Exception\InvalidConfigurationException * @expectedExceptionMessage No user context providers found */ public function testConfigNoProviders() { $container = $this->createContainer(); $config = $this->getBaseConfig(); $config['user_context']['enabled'] = true; $this->extension->load(array($config), $container); $this->userContextListenerPass->process($container); }
/** * @expectedException \RuntimeException * @expectedExceptionMessage requires SensioFrameworkExtraBundle */ public function testNoFrameworkBundle() { $extension = new FOSHttpCacheExtension(); $tagListenerPass = new TagSubscriberPass(); $container = $this->createContainer(); $config = $this->getConfig(); $extension->load(array($config), $container); $tagListenerPass->process($container); }
public function testNoLogger() { $extension = new FOSHttpCacheExtension(); $loggerPass = new LoggerPass(); $container = $this->createContainer(); $config = $this->getConfig(); $extension->load(array($config), $container); $loggerPass->process($container); $this->assertNotHasCall($container, 'fos_http_cache.cache_manager', 'addSubscriber'); }
public function testConfigLoadFlashMessageSubscriber() { $config = array( array('flash_message' => true, ), ); $container = $this->createContainer(); $this->extension->load($config, $container); }