From 27dbd87e39d2d0188701198611040660ba7949f1 Mon Sep 17 00:00:00 2001 From: Andres Campanario Date: Wed, 13 Mar 2024 09:43:56 +0100 Subject: [PATCH] fix test testEnsureUserActiveForResetPasswordFeature --- .../Controller/Traits/PasswordManagementTraitTest.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/TestCase/Controller/Traits/PasswordManagementTraitTest.php b/tests/TestCase/Controller/Traits/PasswordManagementTraitTest.php index 4b21f9bc..236dd972 100644 --- a/tests/TestCase/Controller/Traits/PasswordManagementTraitTest.php +++ b/tests/TestCase/Controller/Traits/PasswordManagementTraitTest.php @@ -428,7 +428,7 @@ public function testRequestPasswordEmptyReference() */ public function testEnsureUserActiveForResetPasswordFeature($ensureActive) { - $expectError = $this->never(); + $expectError = $this->any(); if ($ensureActive) { Configure::write('Users.Registration.ensureActive', true); @@ -444,8 +444,8 @@ public function testEnsureUserActiveForResetPasswordFeature($ensureActive) ->with('reference') ->will($this->returnValue($reference)); $this->Trait->Flash->expects($expectError) - ->method('error') - ->with('There was an error please contact Administrator'); + ->method('success') + ->with('If the account is valid, the system will send an instructional email to the address on record.'); $this->Trait->requestResetPassword(); $this->assertNotEquals('xxx', $this->table->get('00000000-0000-0000-0000-000000000001')->token); }