Browse Source

set timezone in test bootstrap, fix #704 third time

Dmitriy Larionov 8 years ago
parent
commit
8e712e878d
2 changed files with 2 additions and 2 deletions
  1. 2 0
      app/autoload.php
  2. 0 2
      src/Packagist/WebBundle/Tests/Package/SymlinkDumperTest.php

+ 2 - 0
app/autoload.php

@@ -1,5 +1,7 @@
 <?php
 
+ini_set('date.timezone', 'UTC');
+
 use Doctrine\Common\Annotations\AnnotationRegistry;
 
 if (!$loader = @include __DIR__.'/../vendor/autoload.php') {

+ 0 - 2
src/Packagist/WebBundle/Tests/Package/SymlinkDumperTest.php

@@ -23,8 +23,6 @@ class SymlinkDumperTest extends \PHPUnit_Framework_TestCase
      */
     public function testGetTargetListingBlocks($now, array $expected)
     {
-        date_default_timezone_set('UTC');
-
         $blocks = self::invoke($this->mockDumper, 'getTargetListingBlocks', $now);
 
         $blocks = array_map(function($timestamp) { return date('Y-m-d', $timestamp); }, $blocks);