Skip to content

Commit

Permalink
Merge branch '6.2' into 6.3
Browse files Browse the repository at this point in the history
* 6.2:
  cs fix
  [Messenger] Fix passing options set via tags to handler descriptors
  random_bytes length should be an int greater than 0
  enforce UTC timezone in test
  [DependencyInjection] Fix autocasting null env values to empty string
  Fix executable bit
  Fix executable bit
  Readme: Replace Stack Overflow with GitHub Discussions
  [DoctrineBridge] Remove outdated comment
  [DependencyInjection] Fix annotation
  [SecurityBundle] Do not translate `Bearer` header’s `error_description`
  [String] Fix Inflector for 'status'
  [DependencyInjection] Fix resource tracking for lazy services
  [EventDispatcher] [EventDispatcher] Throw exception when listener method cannot be resolved
  • Loading branch information
nicolas-grekas committed Jul 5, 2023
2 parents c81268d + 5774ae9 commit fafab0d
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions Tests/Caster/DateCasterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,22 @@ class DateCasterTest extends TestCase
{
use VarDumperTestTrait;

private $previousTimezone;

protected function setUp(): void
{
parent::setUp();

$this->previousTimezone = date_default_timezone_get();
}

protected function tearDown(): void
{
parent::tearDown();

date_default_timezone_set($this->previousTimezone);
}

/**
* @dataProvider provideDateTimes
*/
Expand Down Expand Up @@ -111,6 +127,8 @@ public static function provideDateTimes()
*/
public function testCastDateTimeNoTimezone($time, $xDate, $xInfos)
{
date_default_timezone_set('UTC');

$stub = new Stub();
$date = new NoTimezoneDate($time);
$cast = DateCaster::castDateTime($date, Caster::castObject($date, \DateTime::class), $stub, false, 0);
Expand Down

0 comments on commit fafab0d

Please sign in to comment.