/** * @covers a */ function test_addBotHotelPage() { $a = new AccountController(); $result = "<h3>Change My Password</h3>" . "<br /><br />" . "<div class='' style='margin:auto; width:30%;'>" . "<div class='' align='left'>" . "<h4>Current Password</h4>" . "<input type = 'password' name = 'textbox_CurrentPass1' required pattern='.{8,}' >" . "<h4>New Password</h4>" . "<input type = 'password' name = 'textbox_NewPass' required pattern='.{8,}' >" . "</div>" . "</div>" . "<br />" . "<br />" . "<br />" . "<input name='button_ChangedPassword' type = 'submit' class='btn btn-primary' value = 'Change Password'/>"; return $this->assertEquals($a->changePasswordPage(), $result); }
$newPass = $_POST['textbox_NewPass']; $temp = $accountController->updatePassword($user, $currentPS, $newPass); if ($temp == "pass") { $value = "<b>Success:</b> your recovery question and answer has been changed.<br />"; } else { $value = "<b>Failed:</b> " . $temp . "<br />"; } } unset($_POST['button_ChangedPassword']); unset($_POST['textbox_CurrentPass1']); unset($_POST['textbox_NewPass']); $user = $accountController->getUserInfo($email); $value .= $accountController->UserInfoPage($user); } else { if (isset($_GET['button_ChangeMyPassword'])) { $value = $accountController->changePasswordPage(); unset($_GET['button_ChangeMyPassword']); } else { if (isset($_GET['button_ChangeMyRecovery'])) { $value = $accountController->changeRecoveryPage(); unset($_GET['button_ChangeMyRecovery']); } else { if (isset($_GET['button_ChangedPassword'])) { $value = "inside changed password"; // $accountController->changePasswordPage(); unset($_GET['button_ChangedPassword']); } else { //$_SESSION['user'] = $accountController->getUserInfo($email); $value = $accountController->UserInfoPage($user); //$email); }