protected function setUp() { $this->container = new ContainerBuilder(); $extension = new LeaptCacheExtension(); $config = array('namespace' => 'LeaptCacheBundle', 'caches' => array('default' => array('type' => 'memcached', 'options' => array('server' => 'localhost', 'port' => 11211)))); $extension->load(array($config), $this->container); }
public function testConfigLoadWithOneCache() { $extension = new LeaptCacheExtension(); $config = array('namespace' => 'LeaptCacheBundle', 'caches' => array('default' => array('type' => 'memcached', 'options' => array('server' => 'localhost', 'port' => 11211)))); $extension->load(array($config), $container = new ContainerBuilder()); $this->assertEquals($config['caches'], $container->getParameter('leapt_cache.caches')); }
protected function setUp() { if (!ini_get('apc.enable_cli')) { if (!ini_set('apc.enable_cli', 1)) { $this->markTestSkipped('apc.enable_cli should be On'); } } $this->container = new ContainerBuilder(); $extension = new LeaptCacheExtension(); $config = array('namespace' => 'LeaptCacheBundle', 'caches' => array('default' => array('type' => 'apc', 'options' => array('ttl' => 3600)))); $extension->load(array($config), $this->container); }