protected function createValidator(): NoSuspiciousCharactersValidator
{ return new NoSuspiciousCharactersValidator();
} /**
* @dataProvider provideNonSuspiciousStrings
*/
public function testNonSuspiciousStrings(string
$string, array
$options =
[]) { $this->validator->
validate($string,
new NoSuspiciousCharacters($options));
$this->
assertNoViolation();
} public static function provideNonSuspiciousStrings(): iterable
{ yield 'Characters from Common script can only fail RESTRICTION_LEVEL_ASCII' =>
[ 'I ❤️ Unicode',
['restrictionLevel' => NoSuspiciousCharacters::RESTRICTION_LEVEL_SINGLE_SCRIPT
],
];