Skip to content

Commit f2d2052

Browse files
committed
[tests] handle when@test config in auth tests
1 parent 0b0e928 commit f2d2052

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/Maker/MakeAuthenticatorTest.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,12 @@ private function runLoginTest(MakerTestRunner $runner, string $userIdentifier, b
342342

343343
// plaintext password: needed for entities, simplifies overall
344344
$runner->modifyYamlFile('config/packages/security.yaml', function (array $config) {
345+
if (isset($config['when@test']['security']['password_hashers'])) {
346+
$config['when@test']['security']['password_hashers'] = [PasswordAuthenticatedUserInterface::class => 'plaintext'];
347+
348+
return $config;
349+
}
350+
345351
// legacy check for 5.2 and lower "encoders"
346352
if (isset($config['security']['password_hashers'])) {
347353
$config['security']['password_hashers'] = [PasswordAuthenticatedUserInterface::class => 'plaintext'];

0 commit comments

Comments
 (0)