returnResponse(true); $this->_response = new Zend_Controller_Response_Http(); Application::$front->setResponse($this->_response); // guest user $users = new Users_Model_Users(); $user = $users->createRow(); Zend_Registry::set('user', $user); } /** * @expectedException Monkeys_BadUrlException */ public function testIndexNoIdentityAction() { Application::$front->setRequest(new TestRequest('/identity')); Application::dispatch(); } public function testIdAction() { Application::$front->setRequest(new TestRequest('/identity/whateva')); $_SERVER['SCRIPT_URI'] = 'http://localhost/communityid/identity/whateva'; Application::dispatch(); $this->assertContains('', $this->_response->getBody()); $this->assertContains('

http://localhost/communityid/identity/whateva

', $this->_response->getBody()); } }