returnResponse(true); $this->_response = new Zend_Controller_Response_Http(); Application::$front->setResponse($this->_response); } public function testChangepasswordAction() { $users = new Users_Model_Users(); $user = $users->createRow(); $user->id = 23; $user->role = Users_Model_User::ROLE_REGISTERED; Zend_Registry::set('user', $user); $targetUser = $users->createRow(); $targetUser->id = 24; Zend_Registry::set('targetUser', $targetUser); Application::$front->setRequest(new TestRequest('/users/profilegeneral/changepassword')); try { Application::dispatch(); $this->fail(); } catch (Exception $e) { $this->assertType('Monkeys_AccessDeniedException', $e); } $targetUser = clone $user; Zend_Registry::set('targetUser', $targetUser); Application::dispatch(); $this->assertContains('