Example #1
0
 /**
  * Set cache object
  *
  * @param Zend_Cache_Core $cache
  */
 public function setCache(Zend_Cache_Core $cache)
 {
     $prefix = $cache->getOption('cache_id_prefix');
     $cache = clone $cache;
     $cache->setOption('automatic_serialization', true);
     $cache->setOption('cache_id_prefix', $prefix . $this->getEnvironment() . '__' . get_class($this) . '__');
     $this->_cache = $cache;
     return $this;
 }
Example #2
0
 /**
  * @group ZF-10189
  */
 public function testIfFileZendLogWasIncluded()
 {
     if (class_exists('Zend_Log', false)) {
         $this->markTestSkipped('File Zend/Log.php already included');
     }
     $cacheCore = new Zend_Cache_Core(array('logging' => true));
     $this->assertTrue($cacheCore->getOption('logger') instanceof Zend_Log);
 }
Example #3
0
 /**
  * @group ZF-9092
  */
 public function testSettingLifetimeAsEmptyIsInterpretedAsNull()
 {
     $config = new Zend_Config(array('lifetime' => '', 'caching' => true));
     $test = new Zend_Cache_Core();
     $test->setConfig($config);
     $this->assertSame(NULL, $test->getOption('lifetime'));
 }