namespace Symfony\Component\Validator\Tests\Constraints;
use Symfony\Component\Validator\Constraints\PasswordStrength;
use Symfony\Component\Validator\Constraints\PasswordStrengthValidator;
use Symfony\Component\Validator\Test\ConstraintValidatorTestCase;
class PasswordStrengthValidatorTest extends ConstraintValidatorTestCase
{ protected function createValidator(): PasswordStrengthValidator
{ return new PasswordStrengthValidator();
} /**
* @dataProvider getValidValues
*/
public function testValidValues(string
$value, int
$expectedStrength) { $this->validator->
validate($value,
new PasswordStrength(minScore:
$expectedStrength));
$this->
assertNoViolation();