@dataProvider getMoreThanTwenty
public function testInvalidValuesMax($value) {
$constraint = new Range(array(
'max' => 20,
'maxMessage' => 'myMessage',
));
$this->context
->expects($this
->once())
->method('addViolation')
->with('myMessage', $this
->identicalTo(array(
'{{ value }}' => $value,
'{{ limit }}' => 20,
)));
$this->validator
->validate($value, $constraint);
}