class FileValidatorPathTest

Hierarchy

  • class \Symfony\Component\Validator\Tests\Constraints\FileValidatorTest extends \Symfony\Component\Validator\Tests\Constraints\PHPUnit_Framework_TestCase

Expanded class hierarchy of FileValidatorPathTest

File

drupal/core/vendor/symfony/validator/Symfony/Component/Validator/Tests/Constraints/FileValidatorPathTest.php, line 16

Namespace

Symfony\Component\Validator\Tests\Constraints
View source
class FileValidatorPathTest extends FileValidatorTest {
  protected function getFile($filename) {
    return $filename;
  }
  public function testFileNotFound() {
    $constraint = new File(array(
      'notFoundMessage' => 'myMessage',
    ));
    $this->context
      ->expects($this
      ->once())
      ->method('addViolation')
      ->with('myMessage', array(
      '{{ file }}' => 'foobar',
    ));
    $this->validator
      ->validate('foobar', $constraint);
  }

}

Members

Namesort descending Modifiers Type Description Overrides
FileValidatorPathTest::getFile protected function Overrides FileValidatorTest::getFile
FileValidatorPathTest::testFileNotFound public function
FileValidatorTest::$context protected property
FileValidatorTest::$file protected property
FileValidatorTest::$path protected property
FileValidatorTest::$validator protected property
FileValidatorTest::setUp protected function
FileValidatorTest::tearDown protected function
FileValidatorTest::testEmptyStringIsValid public function
FileValidatorTest::testExpectsStringCompatibleTypeOrFile public function @expectedException \Symfony\Component\Validator\Exception\UnexpectedTypeException
FileValidatorTest::testInvalidMaxSize public function @expectedException \Symfony\Component\Validator\Exception\ConstraintDefinitionException
FileValidatorTest::testInvalidMimeType public function
FileValidatorTest::testInvalidWildcardMimeType public function
FileValidatorTest::testNullIsValid public function
FileValidatorTest::testTooLargeBytes public function
FileValidatorTest::testTooLargeKiloBytes public function
FileValidatorTest::testTooLargeMegaBytes public function
FileValidatorTest::testUploadedFileError public function @dataProvider uploadedFileErrorProvider
FileValidatorTest::testValidFile public function
FileValidatorTest::testValidMimeType public function
FileValidatorTest::testValidUploadedfile public function
FileValidatorTest::testValidWildcardMimeType public function
FileValidatorTest::uploadedFileErrorProvider public function