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