You are here

public function DateValidatorTest::getInvalidDates in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/validator/Tests/Constraints/DateValidatorTest.php \Symfony\Component\Validator\Tests\Constraints\DateValidatorTest::getInvalidDates()

File

vendor/symfony/validator/Tests/Constraints/DateValidatorTest.php, line 95

Class

DateValidatorTest

Namespace

Symfony\Component\Validator\Tests\Constraints

Code

public function getInvalidDates() {
  return array(
    array(
      'foobar',
      Date::INVALID_FORMAT_ERROR,
    ),
    array(
      'foobar 2010-13-01',
      Date::INVALID_FORMAT_ERROR,
    ),
    array(
      '2010-13-01 foobar',
      Date::INVALID_FORMAT_ERROR,
    ),
    array(
      '2010-13-01',
      Date::INVALID_DATE_ERROR,
    ),
    array(
      '2010-04-32',
      Date::INVALID_DATE_ERROR,
    ),
    array(
      '2010-02-29',
      Date::INVALID_DATE_ERROR,
    ),
  );
}