8000 minor #24752 [VarDumper] Fix DST bug (maidmaid) · symfony/symfony@344e4b0 · GitHub
[go: up one dir, main page]

Skip to content

Commit 344e4b0

Browse files
committed
minor #24752 [VarDumper] Fix DST bug (maidmaid)
This PR was merged into the 3.4 branch. Discussion ---------- [VarDumper] Fix DST bug | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #24749 | License | MIT | Doc PR | / Commits ------- e375e9a Fix DST
2 parents b327a7c + e375e9a commit 344e4b0

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

src/Symfony/Component/VarDumper/Tests/Caster/DateCasterTest.php

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -187,10 +187,10 @@ public function provideIntervals()
187187
return array(
188188
array('PT0S', 0, 0, '0s', '0s'),
189189
array('PT0S', 0.1, 0, $withMs ? '+ 00:00:00.100' : '0s', '%is'),
190-
array('PT1S', 0, 0, '+ 00:00:01'.$ms, '1s'),
191-
array('PT2M', 0, 0, '+ 00:02:00'.$ms, '120s'),
192-
array('PT3H', 0, 0, '+ 03:00:00'.$ms, '10 800s'),
193-
array('P4D', 0, 0, '+ 4d', '34%x %x00s'), // %x to account for DST
190+
array('PT1S', 0, 0, '+ 00:00:01'.$ms, '%is'),
191+
array('PT2M', 0, 0, '+ 00:02:00'.$ms, '%is'),
192+
array('PT3H', 0, 0, '+ 03:00:00'.$ms, '%ss'),
193+
array('P4D', 0, 0, '+ 4d', '%ss'),
194194
array('P5M', 0, 0, '+ 5m', null),
195195
array('P6Y', 0, 0, '+ 6y', null),
196196
array('P1Y2M3DT4H5M6S', 0, 0, '+ 1y 2m 3d 04:05:06'.$ms, null),
@@ -201,10 +201,10 @@ public function provideIntervals()
201201

202202
array('PT0S', 0, 1, '0s', '0s'),
203203
array('PT0S', 0.1, 1, $withMs ? '- 00:00:00.100' : '0s', '%is'),
204-
array('PT1S', 0, 1, '- 00:00:01'.$ms, '-1s'),
205-
array('PT2M', 0, 1, '- 00:02:00'.$ms, '-120s'),
206-
array('PT3H', 0, 1, '- 03:00:00'.$ms, '-10 800s'),
207-
array('P4D', 0, 1, '- 4d', '-345 600s'),
204+
array('PT1S', 0, 1, '- 00:00:01'.$ms, '%is'),
205+
array('PT2M', 0, 1, '- 00:02:00'.$ms, '%is'),
206+
array('PT3H', 0, 1, '- 03:00:00'.$ms, '%ss'),
207+
array('P4D', 0, 1, '- 4d', '%ss'),
208208
array('P5M', 0, 1, '- 5m', null),
209209
array('P6Y', 0, 1, '- 6y', null),
210210
array('P1Y2M3DT4H5M6S', 0, 1, '- 1y 2m 3d 04:05:06'.$ms, null),
@@ -252,7 +252,7 @@ public function testDumpTimeZoneExcludingVerbosity($timezone, $expected)
252252
}
253253
EODUMP;
254254

255-
$this->assertDumpEquals($xDump, $timezone, Caster::EXCLUDE_VERBOSE);
255+
$this->assertDumpMatchesFormat($xDump, $timezone, Caster::EXCLUDE_VERBOSE);
256256
}
257257

258258
/**
@@ -275,7 +275,7 @@ public function testCastTimeZone($timezone, $xTimezone, $xRegion)
275275
]
276276
EODUMP;
277277

278-
$this->assertDumpEquals($xDump, $cast);
278+
$this->assertDumpMatchesFormat($xDump, $cast);
279279

280280
$xDump = <<<EODUMP
281281
Symfony\Component\VarDumper\Caster\ConstStub {
@@ -310,13 +310,13 @@ public function provideTimeZones()
310310
array('z', '+00:00', ''),
311311

312312
// type 3 (timezone identifier)
313-
array('Africa/Tunis', 'Africa/Tunis (+01:00)', $xRegion),
314-
array('America/Panama', 'America/Panama (-05:00)', $xRegion),
315-
array('Asia/Jerusalem', 'Asia/Jerusalem (+03:00)', $xRegion),
316-
array('Atlantic/Canary', 'Atlantic/Canary (+01:00)', $xRegion),
317-
array('Australia/Perth', 'Australia/Perth (+08:00)', $xRegion),
318-
array('Europe/Zurich', 'Europe/Zurich (+02:00)', $xRegion),
319-
array('Pacific/Tahiti', 'Pacific/Tahiti (-10:00)', $xRegion),
313+
array('Africa/Tunis', 'Africa/Tunis (%s:00)', $xRegion),
314+
array('America/Panama', 'America/Panama (%s:00)', $xRegion),
315+
array('Asia/Jerusalem', 'Asia/Jerusalem (%s:00)', $xRegion),
316+
array('Atlantic/Canary', 'Atlantic/Canary (%s:00)', $xRegion),
317+
array('Australia/Perth', 'Australia/Perth (%s:00)', $xRegion),
318+
array('Europe/Zurich', 'Europe/Zurich (%s:00)', $xRegion),
319+
array('Pacific/Tahiti', 'Pacific/Tahiti (%s:00)', $xRegion),
320320
);
321321
}
322322

0 commit comments

Comments
 (0)
0