From 79ecb85bb6d927058de7fd0fd0877652a6f4c916 Mon Sep 17 00:00:00 2001 From: Marco Date: Sun, 30 Jul 2017 00:57:38 +0200 Subject: [PATCH] Add tests for method 'reconfirmPassword' from class 'Auth' --- tests/index.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tests/index.php b/tests/index.php index 0d2f4e7..691c0d1 100644 --- a/tests/index.php +++ b/tests/index.php @@ -203,6 +203,14 @@ function processRequestData(\Delight\Auth\Auth $auth) { return 'too many requests'; } } + else if ($_POST['action'] === 'reconfirmPassword') { + try { + return $auth->reconfirmPassword($_POST['password']) ? 'correct' : 'wrong'; + } + catch (\Delight\Auth\NotLoggedInException $e) { + return 'not logged in'; + } + } else if ($_POST['action'] === 'changePassword') { try { $auth->changePassword($_POST['oldPassword'], $_POST['newPassword']); @@ -483,6 +491,12 @@ function showGeneralForm() { function showAuthenticatedUserForm() { showGeneralForm(); + echo '
'; + echo ''; + echo ' '; + echo ''; + echo '
'; + echo '
'; echo ''; echo ' ';