From 461a214c77abcb1c84b724e995214525af1602d0 Mon Sep 17 00:00:00 2001 From: "Alexander M. Turek" Date: Sat, 1 May 2021 20:23:49 +0200 Subject: [PATCH] [Security] Fix PasswordMigratingListenerTest --- .../Http/Tests/EventListener/PasswordMigratingListenerTest.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Symfony/Component/Security/Http/Tests/EventListener/PasswordMigratingListenerTest.php b/src/Symfony/Component/Security/Http/Tests/EventListener/PasswordMigratingListenerTest.php index 3d8be2767bf78..725105a4ccd0f 100644 --- a/src/Symfony/Component/Security/Http/Tests/EventListener/PasswordMigratingListenerTest.php +++ b/src/Symfony/Component/Security/Http/Tests/EventListener/PasswordMigratingListenerTest.php @@ -114,7 +114,7 @@ public function testUserWithoutPassword() { $this->user = new User('test', null); - $this->encoderFactory->expects($this->never())->method('getEncoder'); + $this->hasherFactory->expects($this->never())->method('getPasswordHasher'); $event = $this->createEvent(new SelfValidatingPassport(new UserBadge('test', function () { return $this->user; }), [new PasswordUpgradeBadge('pa$$word')])); $this->listener->onLoginSuccess($event); @@ -134,6 +134,7 @@ private function createEvent(PassportInterface $passport) abstract class TestMigratingUserProvider implements UserProviderInterface, PasswordUpgraderInterface { abstract public function upgradePassword(PasswordAuthenticatedUserInterface $user, string $newHashedPassword): void; + abstract public function loadUserByIdentifier(string $identifier): UserInterface; }