public function testHeightTooSmall() {
if (!class_exists('Symfony\\Component\\HttpFoundation\\File\\File')) {
$this
->markTestSkipped('The "HttpFoundation" component is not available');
}
$constraint = new Image(array(
'minHeight' => 3,
'minHeightMessage' => 'myMessage',
));
$this->context
->expects($this
->once())
->method('addViolation')
->with('myMessage', array(
'{{ height }}' => '2',
'{{ min_height }}' => '3',
));
$this->validator
->validate($this->image, $constraint);
}