You are here

public function IdenticalToValidatorTest::provideValidComparisons in Zircon Profile 8.0

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

Return value

array

Overrides AbstractComparisonValidatorTestCase::provideValidComparisons

1 call to IdenticalToValidatorTest::provideValidComparisons()
IdenticalToValidatorTest::provideAllValidComparisons in vendor/symfony/validator/Tests/Constraints/IdenticalToValidatorTest.php

File

vendor/symfony/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 (PHP_VERSION_ID >= 50500) {
    $immutableDate = new \DateTimeImmutable('2000-01-01');
    $comparisons[] = array(
      $immutableDate,
      $immutableDate,
    );
  }
  return $comparisons;
}