You are here

protected function AbstractConstraintValidatorTest::setDefaultTimezone in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/validator/Tests/Constraints/AbstractConstraintValidatorTest.php \Symfony\Component\Validator\Tests\Constraints\AbstractConstraintValidatorTest::setDefaultTimezone()
8 calls to AbstractConstraintValidatorTest::setDefaultTimezone()
AbstractComparisonValidatorTestCase::provideAllInvalidComparisons in vendor/symfony/validator/Tests/Constraints/AbstractComparisonValidatorTestCase.php
AbstractComparisonValidatorTestCase::provideAllValidComparisons in vendor/symfony/validator/Tests/Constraints/AbstractComparisonValidatorTestCase.php
AbstractConstraintValidatorTest::setUp in vendor/symfony/validator/Tests/Constraints/AbstractConstraintValidatorTest.php
IdenticalToValidatorTest::provideAllValidComparisons in vendor/symfony/validator/Tests/Constraints/IdenticalToValidatorTest.php
NotIdenticalToValidatorTest::provideAllInvalidComparisons in vendor/symfony/validator/Tests/Constraints/NotIdenticalToValidatorTest.php

... See full list

File

vendor/symfony/validator/Tests/Constraints/AbstractConstraintValidatorTest.php, line 79

Class

AbstractConstraintValidatorTest
@since 2.5.3

Namespace

Symfony\Component\Validator\Tests\Constraints

Code

protected function setDefaultTimezone($defaultTimezone) {

  // Make sure this method can not be called twice before calling
  // also restoreDefaultTimezone()
  if (null === $this->defaultTimezone) {
    $this->defaultTimezone = date_default_timezone_get();
    date_default_timezone_set($defaultTimezone);
  }
}