public function testForgotPasswordActionWithPostData() { $userModel = UserModel::fromArray(array('lastname' => 'Test', 'firstname' => 'Test', 'email' => '[email protected]', 'login' => 'testlogin', 'user_acl_role_id' => 1)); $userModel->setPassword('passwordtest'); $userModel->save(); $this->dispatch('/admin/config/user/forgot-password', 'POST', array('email' => '[email protected]')); $this->assertResponseStatusCode(302); $this->assertModuleName('GcConfig'); $this->assertControllerName('UserController'); $this->assertControllerClass('UserController'); $this->assertMatchedRouteName('config/user/forgot-password'); $userModel->delete(); }