Skip to content

Commit d200aa8

Browse files
oliverkleeSam Tuke
authored andcommitted
[BUGFIX] Use "UTC" as time zone in the integration tests (#68)
This makes the JSON representation of dates independent of the test machine's PHP time zone.
1 parent 35e89bc commit d200aa8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Tests/Integration/Controller/AbstractControllerTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,10 @@ abstract class AbstractControllerTest extends WebTestCase
6767

6868
protected function setUp()
6969
{
70+
// This makes sure that all DateTime instances use the same time zone, thus making the dates in the
71+
// JSON provided by the REST API easier to test.
72+
date_default_timezone_set('UTC');
73+
7074
$this->initializeDatabaseTester();
7175
$this->bootstrap = Bootstrap::getInstance()->setEnvironment(Environment::TESTING)->configure();
7276
$this->entityManager = $this->bootstrap->getEntityManager();

0 commit comments

Comments
 (0)