From 67ce367a3c4680be8b8b9ca0265efb7b33169b32 Mon Sep 17 00:00:00 2001 From: Phil Davis Date: Mon, 14 Jan 2019 17:52:57 +0545 Subject: [PATCH] [stable10] Backport of Adjust acceptance test for issue 33384 --- tests/Core/Command/User/ResetPasswordTest.php | 9 ++++++--- .../features/cliProvisioning/resetUserPassword.feature | 10 ++++------ 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/tests/Core/Command/User/ResetPasswordTest.php b/tests/Core/Command/User/ResetPasswordTest.php index 690087f1f50b..902fcbd00315 100644 --- a/tests/Core/Command/User/ResetPasswordTest.php +++ b/tests/Core/Command/User/ResetPasswordTest.php @@ -281,19 +281,22 @@ public function testPasswordFromEnvAndPasswordConfirmationEmail($expectedResult) ->method('getEnvVar') ->willReturn('fooPass'); - $this->lostController->method('generateTokenAndLink') + $this->lostController->expects($this->once()) + ->method('generateTokenAndLink') ->with('foo') ->willReturn(['http://localhost/foo/bar/123AbcFooBar/foo', '123AbcFooBar']); if ($expectedResult === true) { - $this->lostController->method('setPassword') + $this->lostController->expects($this->once()) + ->method('setPassword') ->willReturn(['status' => 'success']); $output->expects($this->once()) ->method('writeln') ->with("Successfully reset password for foo."); } else { - $this->lostController->method('setPassword') + $this->lostController->expects($this->once()) + ->method('setPassword') ->willReturn("failed"); $output->expects($this->once()) diff --git a/tests/acceptance/features/cliProvisioning/resetUserPassword.feature b/tests/acceptance/features/cliProvisioning/resetUserPassword.feature index 2beb3cdde5dc..74383dd5ed44 100644 --- a/tests/acceptance/features/cliProvisioning/resetUserPassword.feature +++ b/tests/acceptance/features/cliProvisioning/resetUserPassword.feature @@ -26,7 +26,6 @@ Feature: reset user password Use the following link to reset your password: