Exemplo n.º 1
0
 /**
  * @param string $optionCode
  * @param string $extensionRequired
  * @dataProvider constructorBackendTwoLevelsDataProvider
  */
 public function testConstructorBackendTwoLevels($optionCode, $extensionRequired)
 {
     if ($extensionRequired) {
         if (!extension_loaded($extensionRequired)) {
             $this->markTestSkipped("The PHP extension '{$extensionRequired}' is required for this test.");
         }
     }
     $model = new Mage_Core_Model_Cache(array('backend' => $optionCode));
     $backend = $model->getFrontend()->getBackend();
     $this->assertInstanceOf('Zend_Cache_Backend_TwoLevels', $backend);
 }
Exemplo n.º 2
0
 public function testGetFrontend()
 {
     $frontend = $this->_model->getFrontend();
     //$this->assertInstanceOf('Varien_Cache_Core', $frontend);
 }
Exemplo n.º 3
0
 /**
  * Clean expired entities in full page cache
  * @return Enterprise_PageCache_Model_Observer
  */
 public function cleanExpiredCache()
 {
     $this->_cacheInstance->getFrontend()->clean(Zend_Cache::CLEANING_MODE_OLD);
     return $this;
 }
Exemplo n.º 4
0
 /**
  * Retrieve cache object
  *
  * @return Zend_Cache_Core
  */
 public function getCache()
 {
     if (!$this->_cache) {
         $this->_initCache();
     }
     return $this->_cache->getFrontend();
 }
Exemplo n.º 5
0
 public function testGetFrontend()
 {
     $frontend = $this->_model->getFrontend();
     $this->assertSame($this->_cacheFrontend, $frontend);
 }