public function ImageValidatorTest::testSquareNotAllowed in Plug 7
File
- lib/
Symfony/ validator/ Symfony/ Component/ Validator/ Tests/ Constraints/ ImageValidatorTest.php, line 282
Class
Namespace
Symfony\Component\Validator\Tests\ConstraintsCode
public function testSquareNotAllowed() {
$constraint = new Image(array(
'allowSquare' => false,
'allowSquareMessage' => 'myMessage',
));
$this->validator
->validate($this->image, $constraint);
$this
->buildViolation('myMessage')
->setParameter('{{ width }}', 2)
->setParameter('{{ height }}', 2)
->setCode(Image::SQUARE_NOT_ALLOWED_ERROR)
->assertRaised();
}