public function setUp() { parent::setUp(); // doctype fix (someone forgot to clean up after their unit tests) $this->_doctypeHelper = $this->_helper->view->doctype(); $this->_oldDoctype = $this->_doctypeHelper->getDoctype(); $this->_doctypeHelper->setDoctype(Zend_View_Helper_Doctype::HTML4_LOOSE); // disable all active pages foreach ($this->_helper->findAllByActive(true) as $page) { $page->active = false; } }
protected function setUp() { date_default_timezone_set('Europe/Berlin'); if (isset($_SERVER['SERVER_NAME'])) { $this->_oldServer['SERVER_NAME'] = $_SERVER['SERVER_NAME']; } if (isset($_SERVER['SERVER_PORT'])) { $this->_oldServer['SERVER_PORT'] = $_SERVER['SERVER_PORT']; } if (isset($_SERVER['REQUEST_URI'])) { $this->_oldServer['REQUEST_URI'] = $_SERVER['REQUEST_URI']; } $_SERVER['SERVER_NAME'] = 'localhost'; $_SERVER['SERVER_PORT'] = 80; $_SERVER['REQUEST_URI'] = '/'; $this->_front = Zend_Controller_Front::getInstance(); $this->_oldRequest = $this->_front->getRequest(); $this->_oldRouter = $this->_front->getRouter(); $this->_front->resetInstance(); $this->_front->setRequest(new Zend_Controller_Request_Http()); $this->_front->getRouter()->addDefaultRoutes(); parent::setUp(); $this->_helper->setFormatOutput(true); }