File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change 1313
1414use FOS \UserBundle \Tests \TestUser ;
1515use FOS \UserBundle \Util \PasswordUpdater ;
16+ use PHPUnit \Framework \MockObject \MockObject ;
1617use PHPUnit \Framework \TestCase ;
18+ use Symfony \Component \Security \Core \Encoder \EncoderFactoryInterface ;
1719
20+ /**
21+ * @group legacy
22+ */
1823class PasswordUpdaterTest extends TestCase
1924{
2025 /**
21- * @var PasswordUpdater
26+ * @var PasswordUpdater&MockObject
2227 */
2328 private $ updater ;
2429 private $ encoderFactory ;
2530
2631 protected function setUp (): void
2732 {
28- $ this ->encoderFactory = $ this ->getMockBuilder ('Symfony\Component\Security\Core\Encoder\EncoderFactoryInterface ' )->getMock ();
33+ if (!interface_exists (EncoderFactoryInterface::class)) {
34+ $ this ->markTestSkipped ('The PasswordUpdater class does not support Symfony 6+. ' );
35+ }
36+
37+ $ this ->encoderFactory = $ this ->getMockBuilder (EncoderFactoryInterface::class)->getMock ();
2938
3039 $ this ->updater = new PasswordUpdater ($ this ->encoderFactory );
3140 }
You can’t perform that action at this time.
0 commit comments