public function setUp() { $this->_config = new Mage_Core_Model_Config(<<<XML <config> <global> <cache> <types> <single_tag> <label>Tag One</label> <description>This is Tag One</description> <tags>tag_one</tags> </single_tag> <multiple_tags> <label>Tags One and Two</label> <description>These are Tags One and Two</description> <tags>tag_one,tag_two</tags> </multiple_tags> </types> </cache> </global> </config> XML ); $this->_helper = $this->getMock('Mage_Core_Helper_Data', array('__')); $this->_helper->expects($this->any())->method('__')->will($this->returnArgument(0)); $this->_config->setOptions(array('cache_dir' => __DIR__, 'etc_dir' => __DIR__)); $this->_cacheFrontend = $this->getMock('Zend_Cache_Core', array('load', 'test', 'save', 'remove', 'clean', '_getHelper')); $this->_requestProcessor = $this->getMock('stdClass', array('extractContent')); $this->_model = new Mage_Core_Model_Cache(array('config' => $this->_config, 'helper' => $this->_helper, 'frontend' => $this->_cacheFrontend, 'backend' => 'BlackHole', 'request_processors' => array($this->_requestProcessor))); }
protected function setUp() { $this->_helper = $this->getMock('Mage_Core_Helper_Abstract', array('_getModuleName')); $this->_helper->expects($this->any())->method('_getModuleName')->will($this->returnValue('Mage_Core')); }