Exemplo n.º 1
0
 /**
  * Disable some cache types in VDE mode
  */
 protected function _disableCache()
 {
     foreach ($this->_dataHelper->getDisabledCacheTypes() as $cacheCode) {
         if ($this->_cacheManager->canUse($cacheCode)) {
             $this->_cacheManager->banUse($cacheCode);
         }
     }
 }
Exemplo n.º 2
0
 public function testCanUseAndBanUse()
 {
     $actualCacheOptions = $this->_model->canUse('');
     $this->assertEquals(array('config' => true), $actualCacheOptions);
     $this->assertTrue($this->_model->canUse('config'));
     $this->_model->banUse('config');
     $this->assertFalse($this->_model->canUse('config'));
 }
Exemplo n.º 3
0
 /**
  * @depends testCanUse
  * @param Mage_Core_Model_Cache $model
  * @return Mage_Core_Model_CacheTest
  */
 public function testBanUse(Mage_Core_Model_Cache $model)
 {
     $this->assertTrue($model->canUse('config'));
     $model->banUse('config');
     $this->assertFalse($model->canUse('config'));
     return $model;
 }