From 629e6987e6b55178d1df7000bd14a6010e84a108 Mon Sep 17 00:00:00 2001 From: Robin Chalas Date: Sat, 3 Jul 2021 23:17:34 +0200 Subject: [PATCH] [Security] Don't skip UserPasswordValidatorTest --- .../Validator/Constraints/UserPasswordValidatorTest.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Symfony/Component/Security/Core/Tests/Validator/Constraints/UserPasswordValidatorTest.php b/src/Symfony/Component/Security/Core/Tests/Validator/Constraints/UserPasswordValidatorTest.php index ecead3d111..0459e821fd 100644 --- a/src/Symfony/Component/Security/Core/Tests/Validator/Constraints/UserPasswordValidatorTest.php +++ b/src/Symfony/Component/Security/Core/Tests/Validator/Constraints/UserPasswordValidatorTest.php @@ -11,7 +11,6 @@ namespace Symfony\Component\Security\Core\Tests\Validator\Constraints; -use Foo\Bar\User; use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; use Symfony\Component\Security\Core\Encoder\EncoderFactoryInterface; use Symfony\Component\Security\Core\Encoder\PasswordEncoderInterface; @@ -25,7 +24,7 @@ use Symfony\Component\Validator\Test\ConstraintValidatorTestCase; /** * @author Bernhard Schussek */ -abstract class UserPasswordValidatorTest extends ConstraintValidatorTestCase +class UserPasswordValidatorTest extends ConstraintValidatorTestCase { private const PASSWORD = 's3Cr3t'; private const SALT = '^S4lt$'; @@ -119,7 +118,7 @@ abstract class UserPasswordValidatorTest extends ConstraintValidatorTestCase public function testUserIsNotValid() { $this->expectException(ConstraintDefinitionException::class); - $user = $this->createMock(User::class); + $user = new \stdClass(); $this->tokenStorage = $this->createTokenStorage($user); $this->validator = $this->createValidator();