From 4f6692bd25cdd29665199f69d3662fda705450e7 Mon Sep 17 00:00:00 2001 From: Marco Date: Sun, 25 Mar 2018 04:58:24 +0200 Subject: [PATCH] Also test return values of 'confirmEmail' and 'confirmEmailAndSignIn' --- tests/index.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tests/index.php b/tests/index.php index fab3785..bae0019 100644 --- a/tests/index.php +++ b/tests/index.php @@ -151,13 +151,12 @@ function processRequestData(\Delight\Auth\Auth $auth) { // do not keep logged in after session ends $rememberDuration = null; } - $auth->confirmEmailAndSignIn($_POST['selector'], $_POST['token'], $rememberDuration); + + return $auth->confirmEmailAndSignIn($_POST['selector'], $_POST['token'], $rememberDuration); } else { - $auth->confirmEmail($_POST['selector'], $_POST['token']); + return $auth->confirmEmail($_POST['selector'], $_POST['token']); } - - return 'ok'; } catch (\Delight\Auth\InvalidSelectorTokenPairException $e) { return 'invalid token';