Explorar el Código

set timezone in test bootstrap, fix #704 third time

Dmitriy Larionov hace 8 años
padre
commit
8e712e878d

+ 2 - 0
app/autoload.php

@@ -1,5 +1,7 @@
 <?php
 <?php
 
 
+ini_set('date.timezone', 'UTC');
+
 use Doctrine\Common\Annotations\AnnotationRegistry;
 use Doctrine\Common\Annotations\AnnotationRegistry;
 
 
 if (!$loader = @include __DIR__.'/../vendor/autoload.php') {
 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)
     public function testGetTargetListingBlocks($now, array $expected)
     {
     {
-        date_default_timezone_set('UTC');
-
         $blocks = self::invoke($this->mockDumper, 'getTargetListingBlocks', $now);
         $blocks = self::invoke($this->mockDumper, 'getTargetListingBlocks', $now);
 
 
         $blocks = array_map(function($timestamp) { return date('Y-m-d', $timestamp); }, $blocks);
         $blocks = array_map(function($timestamp) { return date('Y-m-d', $timestamp); }, $blocks);