public function ImageValidatorTest::testWidthTooBig in Plug 7
File
- lib/
Symfony/ validator/ Symfony/ Component/ Validator/ Tests/ Constraints/ ImageValidatorTest.php, line 119
Class
Namespace
Symfony\Component\Validator\Tests\ConstraintsCode
public function testWidthTooBig() {
$constraint = new Image(array(
'maxWidth' => 1,
'maxWidthMessage' => 'myMessage',
));
$this->validator
->validate($this->image, $constraint);
$this
->buildViolation('myMessage')
->setParameter('{{ width }}', '2')
->setParameter('{{ max_width }}', '1')
->setCode(Image::TOO_WIDE_ERROR)
->assertRaised();
}