8000 Fix low-deps test · symfony/symfony@e765a9b · GitHub
[go: up one dir, main page]

Skip to content

Commit e765a9b

Browse files
committed
Fix low-deps test
1 parent 533142b commit e765a9b

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/Symfony/Component/Form/Tests/Extension/PasswordHasher/Type/PasswordTypePasswordHasherExtensionTest.php

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
use Symfony\Component\Form\Extension\PasswordHasher\PasswordHasherExtension;
1818
use Symfony\Component\Form\Test\TypeTestCase;
1919
use Symfony\Component\Form\Tests\Fixtures\User;
20+
use Symfony\Component\PasswordHasher\Hasher\UserPasswordHasher;
2021
use Symfony\Component\PasswordHasher\Hasher\UserPasswordHasherInterface;
2122
use 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

0 commit comments

Comments
 (0)
0