You are here

public function GreaterThanValidatorTest::provideInvalidComparisons in Zircon Profile 8.0

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

Return value

array

Overrides AbstractComparisonValidatorTestCase::provideInvalidComparisons

File

vendor/symfony/validator/Tests/Constraints/GreaterThanValidatorTest.php, line 57

Class

GreaterThanValidatorTest
@author Daniel Holmes <daniel@danielholmes.org>

Namespace

Symfony\Component\Validator\Tests\Constraints

Code

public function provideInvalidComparisons() {
  return array(
    array(
      1,
      '1',
      2,
      '2',
      'integer',
    ),
    array(
      2,
      '2',
      2,
      '2',
      'integer',
    ),
    array(
      new \DateTime('2000/01/01'),
      'Jan 1, 2000, 12:00 AM',
      new \DateTime('2005/01/01'),
      'Jan 1, 2005, 12:00 AM',
      'DateTime',
    ),
    array(
      new \DateTime('2000/01/01'),
      'Jan 1, 2000, 12:00 AM',
      new \DateTime('2000/01/01'),
      'Jan 1, 2000, 12:00 AM',
      'DateTime',
    ),
    array(
      new \DateTime('2000/01/01'),
      'Jan 1, 2000, 12:00 AM',
      '2005/01/01',
      'Jan 1, 2005, 12:00 AM',
      'DateTime',
    ),
    array(
      new \DateTime('2000/01/01'),
      'Jan 1, 2000, 12:00 AM',
      '2000/01/01',
      'Jan 1, 2000, 12:00 AM',
      'DateTime',
    ),
    array(
      new \DateTime('2000/01/01 UTC'),
      'Jan 1, 2000, 12:00 AM',
      '2005/01/01 UTC',
      'Jan 1, 2005, 12:00 AM',
      'DateTime',
    ),
    array(
      new \DateTime('2000/01/01 UTC'),
      'Jan 1, 2000, 12:00 AM',
      '2000/01/01 UTC',
      'Jan 1, 2000, 12:00 AM',
      'DateTime',
    ),
    array(
      new ComparisonTest_Class(4),
      '4',
      new ComparisonTest_Class(5),
      '5',
      __NAMESPACE__ . '\\ComparisonTest_Class',
    ),
    array(
      new ComparisonTest_Class(5),
      '5',
      new ComparisonTest_Class(5),
      '5',
      __NAMESPACE__ . '\\ComparisonTest_Class',
    ),
    array(
      '22',
      '"22"',
      '333',
      '"333"',
      'string',
    ),
    array(
      '22',
      '"22"',
      '22',
      '"22"',
      'string',
    ),
  );
}