public function ImageValidatorTest::testFileNotFound in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/validator/Tests/Constraints/ImageValidatorTest.php \Symfony\Component\Validator\Tests\Constraints\ImageValidatorTest::testFileNotFound()
File
- vendor/
symfony/ validator/ Tests/ Constraints/ ImageValidatorTest.php, line 77
Class
- ImageValidatorTest
- @requires extension fileinfo
Namespace
Symfony\Component\Validator\Tests\ConstraintsCode
public function testFileNotFound() {
// Check that the logic from FileValidator still works
$constraint = new Image(array(
'notFoundMessage' => 'myMessage',
));
$this->validator
->validate('foobar', $constraint);
$this
->buildViolation('myMessage')
->setParameter('{{ file }}', '"foobar"')
->setCode(Image::NOT_FOUND_ERROR)
->assertRaised();
}