Пример #1
0
 /**
  * @group ZF-9738
  */
 public function testZendServer()
 {
     if (!function_exists('zend_disk_cache_store')) {
         $this->markTestSkipped('ZendServer is required for this test');
     }
     $options = array('foo' => array('frontend' => array('name' => 'Core', 'options' => array('lifetime' => 7200)), 'backend' => array('name' => 'ZendServer_Disk')));
     $resource = new CacheManager($options);
     $manager = $resource->init();
     $cache = $manager->getCache('foo')->getBackend();
     $this->assertTrue($cache instanceof \Zend\Cache\Backend\ZendServer\Disk);
 }
Пример #2
0
 /**
  * @group ZF-10033
  */
 public function testSetDefaultMetadataCacheFromCacheManager()
 {
     $this->markTestSkipped('DbResource has fatal error - skip this test now.');
     return;
     $configCache = array('database' => array('frontend' => array('name' => 'Core', 'options' => array('lifetime' => 120, 'automatic_serialization' => true)), 'backend' => array('name' => 'BlackHole')));
     $resource = new CacheManagerResource($configCache);
     $resource->setBootstrap($this->bootstrap);
     $resource->init();
     //$this->bootstrap->registerPluginResource('cachemanager', $configCache);
     $config = array('bootstrap' => $this->bootstrap, 'adapter' => 'Pdo\\Sqlite', 'params' => array('dbname' => ':memory:'), 'defaultMetadataCache' => 'database');
     $resource = new DbResource($config);
     $resource->init();
     $this->assertInstanceOf('Zend\\Cache\\Frontend', \Zend\Db\Table\AbstractTable::getDefaultMetadataCache());
 }