Esempio n. 1
0
 /**
  * @test
  */
 public function testControllerActionPredispatchAdminhtmlCacheMassRefresh()
 {
     $this->_fpc->save('test_data', 'test_id');
     Mage::app()->getRequest()->setParam('types', array('core'));
     $this->_cleanObserver->controllerActionPredispatchAdminhtmlCacheMassRefresh();
     $this->assertEquals('test_data', $this->_fpc->load('test_id'));
     $this->_fpc->clean();
     $this->_fpc->save('test_data', 'test_id');
     Mage::app()->getRequest()->setParam('types', array('core', Lesti_Fpc_Model_Observer_Clean::CACHE_TYPE));
     $this->_cleanObserver->controllerActionPredispatchAdminhtmlCacheMassRefresh();
     $this->assertFalse($this->_fpc->load('test_id'));
     $this->_fpc->clean();
     $this->_fpc->save('test_data', 'test_id');
     Mage::app()->getRequest()->setParam('types', array('core', Lesti_Fpc_Model_Observer_Clean::CACHE_TYPE));
     Mage::app()->getCacheInstance()->banUse('fpc');
     $this->_cleanObserver->controllerActionPredispatchAdminhtmlCacheMassRefresh();
     $this->assertEquals('test_data', $this->_fpc->load('test_id'));
 }