You are here

public function DateValidatorTest::getInvalidDates in Plug 7

File

lib/Symfony/validator/Symfony/Component/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,
    ),
  );
}