$this->validator->
validate($object,
$constraint);
$this->
assertCount(2,
$this->context->
getViolations());
} /**
* @dataProvider provideCompileIsValid
*/
public function testCompileIsValid(string
$expression, array
$names, string
$expected) { $expressionLanguage =
new ExpressionLanguage();
$expressionLanguage->
registerProvider(new ExpressionLanguageProvider());
$result =
$expressionLanguage->
compile($expression,
$names);
$this->
assertSame($expected,
$result);
} public static function provideCompileIsValid(): array
{ return [ [ 'is_valid("foo", constraints)',
[