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