Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite765a9b

Browse files
committed
Fix low-deps test
1 parent533142b commite765a9b

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
useSymfony\Component\Form\Extension\PasswordHasher\PasswordHasherExtension;
1818
useSymfony\Component\Form\Test\TypeTestCase;
1919
useSymfony\Component\Form\Tests\Fixtures\User;
20+
useSymfony\Component\PasswordHasher\Hasher\UserPasswordHasher;
2021
useSymfony\Component\PasswordHasher\Hasher\UserPasswordHasherInterface;
2122
useSymfony\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 =newUser();
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)

[8]ページ先頭

©2009-2025 Movatter.jp