public function FileValidatorPathTest::testFileNotFound in Plug 7
File
- lib/
Symfony/ validator/ Symfony/ Component/ Validator/ Tests/ Constraints/ FileValidatorPathTest.php, line 23
Class
Namespace
Symfony\Component\Validator\Tests\ConstraintsCode
public function testFileNotFound() {
$constraint = new File(array(
'notFoundMessage' => 'myMessage',
));
$this->validator
->validate('foobar', $constraint);
$this
->buildViolation('myMessage')
->setParameter('{{ file }}', '"foobar"')
->setCode(File::NOT_FOUND_ERROR)
->assertRaised();
}