public function tearDown() { Kwf_Events_ModelObserver::getInstance()->setSkipFnF(true); Kwf_Component_Data_Root::reset(); Kwf_Component_Cache::clearInstance(); Kwf_Model_Abstract::clearInstances(); Kwf_Events_Dispatcher::clearCache(); Kwf_Events_Subscriber::clearInstances(); Kwf_Component_PagesMetaModel::clearInstance(); Kwf_Trl::getInstance()->unsetTrlElements(); }
protected function _init($componentClass) { Kwf_Component_Data_Root::setComponentClass($componentClass); Zend_Session::$_unitTestEnabled = true; $this->_root = Kwf_Component_Data_Root::getInstance(); $this->_root->setFilename('kwf/kwctest/' . $componentClass); if (function_exists('apc_clear_cache')) { apc_clear_cache('user'); } Kwf_Component_Cache_Memory::getInstance()->_clean(); Kwf_Cache_Simple::resetZendCache(); Kwf_Component_PagesMetaModel::setInstance(new Kwf_Model_FnF(array('primaryKey' => 'page_id'))); Kwf_Assets_Package_Default::clearInstances(); Kwf_Component_LogDuplicateModel::setInstance(new Kwf_Model_FnF(array())); Kwf_Media_MemoryCache::getInstance()->clean(); Kwf_Events_Subscriber::clearInstances(); return $this->_root; }