You are here

public function RangeValidatorTest::getTenthToTwentiethMarch2014 in Zircon Profile 8.0

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

File

vendor/symfony/validator/Tests/Constraints/RangeValidatorTest.php, line 185

Class

RangeValidatorTest

Namespace

Symfony\Component\Validator\Tests\Constraints

Code

public function getTenthToTwentiethMarch2014() {

  // The provider runs before setUp(), so we need to manually fix
  // the default timezone
  $this
    ->setDefaultTimezone('UTC');
  $tests = array(
    array(
      new \DateTime('March 10, 2014'),
    ),
    array(
      new \DateTime('March 15, 2014'),
    ),
    array(
      new \DateTime('March 20, 2014'),
    ),
  );
  if (PHP_VERSION_ID >= 50500) {
    $tests[] = array(
      new \DateTimeImmutable('March 10, 2014'),
    );
    $tests[] = array(
      new \DateTimeImmutable('March 15, 2014'),
    );
    $tests[] = array(
      new \DateTimeImmutable('March 20, 2014'),
    );
  }
  $this
    ->restoreDefaultTimezone();
  return $tests;
}