You are here

protected function AbstractConstraintValidatorTest::setDefaultTimezone in Plug 7

8 calls to AbstractConstraintValidatorTest::setDefaultTimezone()
AbstractComparisonValidatorTestCase::provideAllInvalidComparisons in lib/Symfony/validator/Symfony/Component/Validator/Tests/Constraints/AbstractComparisonValidatorTestCase.php
AbstractComparisonValidatorTestCase::provideAllValidComparisons in lib/Symfony/validator/Symfony/Component/Validator/Tests/Constraints/AbstractComparisonValidatorTestCase.php
AbstractConstraintValidatorTest::setUp in lib/Symfony/validator/Symfony/Component/Validator/Tests/Constraints/AbstractConstraintValidatorTest.php
IdenticalToValidatorTest::provideAllValidComparisons in lib/Symfony/validator/Symfony/Component/Validator/Tests/Constraints/IdenticalToValidatorTest.php
NotIdenticalToValidatorTest::provideAllInvalidComparisons in lib/Symfony/validator/Symfony/Component/Validator/Tests/Constraints/NotIdenticalToValidatorTest.php

... See full list

File

lib/Symfony/validator/Symfony/Component/Validator/Tests/Constraints/AbstractConstraintValidatorTest.php, line 95

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);
  }
}