コード例 #1
0
 /**
  * @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);
 }
コード例 #2
0
ファイル: AppTest.php プロジェクト: nemphys/magento2
 public function testGetCacheInstance()
 {
     $cache = $this->_mageModel->getCacheInstance();
     $this->assertInstanceOf('Mage_Core_Model_Cache', $cache);
     $this->assertSame($cache, $this->_mageModel->getCacheInstance());
 }
コード例 #3
0
ファイル: Rule.php プロジェクト: okite11/frames21
 /**
  * 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;
 }