@dataProvider getFiveOrMoreCharacters
public function testInvalidValuesMax($value, $mbOnly = false) {
if ($mbOnly && !function_exists('mb_strlen')) {
$this
->markTestSkipped('mb_strlen does not exist');
}
$constraint = new Length(array(
'max' => 4,
'maxMessage' => 'myMessage',
));
$this->context
->expects($this
->once())
->method('addViolation')
->with('myMessage', $this
->identicalTo(array(
'{{ value }}' => (string) $value,
'{{ limit }}' => 4,
)), $this
->identicalTo($value), 4);
$this->validator
->validate($value, $constraint);
}