You are here

public function IdenticalToValidatorTest::provideValidComparisons in Plug 7

Return value

array

Overrides AbstractComparisonValidatorTestCase::provideValidComparisons

1 call to IdenticalToValidatorTest::provideValidComparisons()
IdenticalToValidatorTest::provideAllValidComparisons in lib/Symfony/validator/Symfony/Component/Validator/Tests/Constraints/IdenticalToValidatorTest.php

File

lib/Symfony/validator/Symfony/Component/Validator/Tests/Constraints/IdenticalToValidatorTest.php, line 54

Class

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

Namespace

Symfony\Component\Validator\Tests\Constraints

Code

public function provideValidComparisons() {
  $date = new \DateTime('2000-01-01');
  $object = new ComparisonTest_Class(2);
  $comparisons = array(
    array(
      3,
      3,
    ),
    array(
      'a',
      'a',
    ),
    array(
      $date,
      $date,
    ),
    array(
      $object,
      $object,
    ),
    array(
      null,
      1,
    ),
  );
  if (version_compare(PHP_VERSION, '>=', '5.5')) {
    $immutableDate = new \DateTimeImmutable('2000-01-01');
    $comparisons[] = array(
      $immutableDate,
      $immutableDate,
    );
  }
  return $comparisons;
}