public function ImageValidatorTest::testRatioTooSmall 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::testRatioTooSmall()
File
- vendor/
symfony/ validator/ Tests/ Constraints/ ImageValidatorTest.php, line 218
Class
- ImageValidatorTest
- @requires extension fileinfo
Namespace
Symfony\Component\Validator\Tests\ConstraintsCode
public function testRatioTooSmall() {
$constraint = new Image(array(
'minRatio' => 2,
'minRatioMessage' => 'myMessage',
));
$this->validator
->validate($this->image, $constraint);
$this
->buildViolation('myMessage')
->setParameter('{{ ratio }}', 1)
->setParameter('{{ min_ratio }}', 2)
->setCode(Image::RATIO_TOO_SMALL_ERROR)
->assertRaised();
}