You are here

public function NotIdenticalToValidatorTest::provideInvalidComparisons in Plug 7

Return value

array

Overrides AbstractComparisonValidatorTestCase::provideInvalidComparisons

1 call to NotIdenticalToValidatorTest::provideInvalidComparisons()
NotIdenticalToValidatorTest::provideAllInvalidComparisons in lib/Symfony/validator/Symfony/Component/Validator/Tests/Constraints/NotIdenticalToValidatorTest.php

File

lib/Symfony/validator/Symfony/Component/Validator/Tests/Constraints/NotIdenticalToValidatorTest.php, line 73

Class

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

Namespace

Symfony\Component\Validator\Tests\Constraints

Code

public function provideInvalidComparisons() {
  $date = new \DateTime('2000-01-01');
  $object = new ComparisonTest_Class(2);
  $comparisons = array(
    array(
      3,
      '3',
      3,
      '3',
      'integer',
    ),
    array(
      'a',
      '"a"',
      'a',
      '"a"',
      'string',
    ),
    array(
      $date,
      'Jan 1, 2000, 12:00 AM',
      $date,
      'Jan 1, 2000, 12:00 AM',
      'DateTime',
    ),
    array(
      $object,
      '2',
      $object,
      '2',
      __NAMESPACE__ . '\\ComparisonTest_Class',
    ),
  );
  if (version_compare(PHP_VERSION, '>=', '5.5')) {
    $immutableDate = new \DateTimeImmutable('2000-01-01');
    $comparisons[] = array(
      $immutableDate,
      'Jan 1, 2000, 12:00 AM',
      $immutableDate,
      'Jan 1, 2000, 12:00 AM',
      'DateTime',
    );
  }
  return $comparisons;
}