protected PasswordHasherInterface
$hasher;
protected PasswordHasherFactoryInterface
$hasherFactory;
protected function createValidator(): UserPasswordValidator
{ return new UserPasswordValidator($this->tokenStorage,
$this->hasherFactory
);
} protected function setUp(): void
{ $user =
$this->
createUser();
$this->tokenStorage =
$this->
createTokenStorage($user);
$this->hasher =
$this->
createMock(PasswordHasherInterface::
class);
$this->hasherFactory =
$this->
createHasherFactory($this->hasher
);
parent::
setUp();
} /**
* @dataProvider provideConstraints
*/
public function testPasswordIsValid(UserPassword
$constraint) {