$this->
expectException(\RuntimeException::
class);
$this->
expectExceptionMessage('No password hasher has been configured for account "Foo\Bar\User".'
);
$this->passwordHasherCommandTester->
execute([ 'password' => 'password',
'user-class' => 'Foo\Bar\User',
],
['interactive' => false
]);
} public function testEncodePasswordAsksNonProvidedUserClass() { $this->passwordHasherCommandTester->
setInputs(['Custom\Class\Pbkdf2\User', "\n"
]);
$this->passwordHasherCommandTester->
execute([ 'password' => 'password',
],
['decorated' => false
]);
$this->
assertStringContainsString(<<<EOTXT
For which user class would you like to hash a password? [Custom\Class\Native\User]:
[0] Custom\Class\Native\User
[1] Custom\Class\Pbkdf2\User
[2] Custom\Class\Test\User
[3] Symfony\Component\Security\Core\User\InMemoryUser
EOTXT
,