File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
src/Symfony/Component/Form/Tests/Extension/PasswordHasher/Type Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change 1717use Symfony \Component \Form \Extension \PasswordHasher \PasswordHasherExtension ;
1818use Symfony \Component \Form \Test \TypeTestCase ;
1919use Symfony \Component \Form \Tests \Fixtures \User ;
20+ use Symfony \Component \PasswordHasher \Hasher \UserPasswordHasher ;
2021use Symfony \Component \PasswordHasher \Hasher \UserPasswordHasherInterface ;
2122use Symfony \Component \Security \Core \User \PasswordAuthenticatedUserInterface ;
2223
@@ -33,7 +34,7 @@ protected function setUp(): void
3334 $ this ->markTestSkipped ('PasswordAuthenticatedUserInterface not available. ' );
3435 }
3536
36- $ this ->passwordHasher = $ this ->createMock (UserPasswordHasherInterface ::class);
37+ $ this ->passwordHasher = $ this ->createMock (UserPasswordHasher ::class);
3738
3839 parent ::setUp ();
3940 }
@@ -52,7 +53,8 @@ public function testPasswordHashSuccess()
5253 $ plainPassword = 'PlainPassword ' ;
5354 $ hashedPassword = 'HashedPassword ' ;
5455
55- $ this ->passwordHasher ->expects ($ this ->once ())
56+ $ this ->passwordHasher
57+ ->expects ($ this ->once ())
5658 ->method ('hashPassword ' )
5759 ->with ($ user , $ plainPassword )
5860 ->willReturn ($ hashedPassword )
@@ -79,6 +81,11 @@ public function testPasswordHashOnInvalidForm()
7981 {
8082 $ user = new User ();
8183
84+ $ this ->passwordHasher
85+ ->expects ($ this ->never ())
86+ ->method ('hashPassword ' )
87+ ;
88+
8289 $ this ->assertNull ($ user ->getPassword ());
8390
8491 $ form = $ this ->factory
You can’t perform that action at this time.
0 commit comments