// Since the contextual validator is mocked, this test only asserts that it
// is called with the right DivisibleBy constraint.
public function testDivisibleBy() { $constraint =
new Count([ 'divisibleBy' => 123,
'divisibleByMessage' => 'foo {{ compared_value }}',
]);
$this->
expectValidateValue(0, 3,
[new DivisibleBy([ 'value' => 123,
'message' => 'foo {{ compared_value }}',
])],
$this->group
);
$this->validator->
validate(['foo', 'bar', 'ccc'
],
$constraint);
$this->
assertNoViolation();
}}