public function ImageValidatorTest::testSquareNotAllowed in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/symfony/validator/Tests/Constraints/ImageValidatorTest.php \Symfony\Component\Validator\Tests\Constraints\ImageValidatorTest::testSquareNotAllowed()
File
- vendor/
symfony/ validator/ Tests/ Constraints/ ImageValidatorTest.php, line 285
Class
- ImageValidatorTest
- @requires extension fileinfo
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();
}