public function testWidthTooBig() {
if (!class_exists('Symfony\\Component\\HttpFoundation\\File\\File')) {
$this
->markTestSkipped('The "HttpFoundation" component is not available');
}
$constraint = new Image(array(
'maxWidth' => 1,
'maxWidthMessage' => 'myMessage',
));
$this->context
->expects($this
->once())
->method('addViolation')
->with('myMessage', array(
'{{ width }}' => '2',
'{{ max_width }}' => '1',
));
$this->validator
->validate($this->image, $constraint);
}