/** * Sets up the fixture, for example, open a network connection. * This method is called before a test is executed. * * @access protected */ protected function setUp() { $this->basePath = realpath(__DIR__ . str_repeat(DIRECTORY_SEPARATOR . '..', 2)); $this->request = new \Zend\Controller\Request\Http(); $this->response = new \Zend\Controller\Response\Http(); $this->front = \Zend\Controller\Front::getInstance(); $this->front->resetInstance(); $this->front->addModuleDirectory($this->basePath . DIRECTORY_SEPARATOR . '_files' . DIRECTORY_SEPARATOR . 'modules')->setRequest($this->request)->setResponse($this->response); $this->broker = $this->front->getHelperBroker(); $this->helper = new Helper\ViewRenderer(); $this->broker->register('viewRenderer', $this->helper); }