You are here

public function FileValidatorPathTest::testFileNotFound in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/symfony/validator/Tests/Constraints/FileValidatorPathTest.php \Symfony\Component\Validator\Tests\Constraints\FileValidatorPathTest::testFileNotFound()

File

vendor/symfony/validator/Tests/Constraints/FileValidatorPathTest.php, line 23

Class

FileValidatorPathTest

Namespace

Symfony\Component\Validator\Tests\Constraints

Code

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();
}