public function ImageValidatorTest::testHeightTooSmall 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::testHeightTooSmall()
File
- vendor/
symfony/ validator/ Tests/ Constraints/ ImageValidatorTest.php, line 138
Class
- ImageValidatorTest
- @requires extension fileinfo
Namespace
Symfony\Component\Validator\Tests\ConstraintsCode
public function testHeightTooSmall() {
$constraint = new Image(array(
'minHeight' => 3,
'minHeightMessage' => 'myMessage',
));
$this->validator
->validate($this->image, $constraint);
$this
->buildViolation('myMessage')
->setParameter('{{ height }}', '2')
->setParameter('{{ min_height }}', '3')
->setCode(Image::TOO_LOW_ERROR)
->assertRaised();
}