/** * 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); } } }
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')); }
/** * @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; }