Skip to content

Commit

Permalink
Merge pull request #32 from slepic/system-clock-test-use-default-time…
Browse files Browse the repository at this point in the history
…zone

fix test of system clock using default timezone
  • Loading branch information
lcobucci authored Apr 26, 2020
2 parents 01ea215 + 2c0c60a commit 412a08d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/SystemClockTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
use DateTimeImmutable;
use DateTimeZone;
use PHPUnit\Framework\TestCase;
use function date_default_timezone_get;

final class SystemClockTest extends TestCase
{
Expand All @@ -16,7 +17,7 @@ final class SystemClockTest extends TestCase
*/
public function constructShouldUseSystemDefaultTimezoneIfNoneWasProvided(): void
{
self::assertEquals(new SystemClock(new DateTimeZone('UTC')), new SystemClock());
self::assertEquals(new SystemClock(new DateTimeZone(date_default_timezone_get())), new SystemClock());
}

/**
Expand Down

0 comments on commit 412a08d

Please sign in to comment.