4 * This file is part of the Symfony package.
6 * (c) Fabien Potencier <fabien@symfony.com>
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
12 namespace Symfony\Component\Validator\Tests\Constraints;
14 use Symfony\Component\Validator\Constraints\File;
16 class FileValidatorPathTest extends FileValidatorTest
18 protected function getFile($filename)
23 public function testFileNotFound()
25 $constraint = new File(array(
26 'notFoundMessage' => 'myMessage',
29 $this->validator->validate('foobar', $constraint);
31 $this->buildViolation('myMessage')
32 ->setParameter('{{ file }}', '"foobar"')
33 ->setCode(File::NOT_FOUND_ERROR)