/** * @param Mage_Core_Model_App $mageApp * @param Mage_Core_Model_Cache $cacheInstance */ function let($mageApp, $cacheInstance) { $mageApp->getCacheInstance()->willReturn($cacheInstance); $cacheInstance->flush()->shouldBeCalled(); $this->beConstructedWith($mageApp); }
public function testGetCacheInstance() { $cache = $this->_mageModel->getCacheInstance(); $this->assertInstanceOf('Mage_Core_Model_Cache', $cache); $this->assertSame($cache, $this->_mageModel->getCacheInstance()); }
/** * Invalidate related cache types * * @return Mage_CatalogRule_Model_Rule */ protected function _invalidateCache() { $types = $this->_config->getNode(self::XML_NODE_RELATED_CACHE); if ($types) { $types = $types->asArray(); $this->_app->getCacheInstance()->invalidateType(array_keys($types)); } return $this; }