Skip to content

Commit a2f26d7

Browse files
Merge branch '6.4' into 7.3
* 6.4: [Validator] Skip tests using unavailable timezone on the local host [Yaml] Fix scope resolution operator in flow mapping keys
2 parents bcc241a + 9352177 commit a2f26d7

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Tests/Constraints/TimezoneValidatorTest.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,11 @@ public function testGroupedTimezonesWithInvalidCountry()
270270
*/
271271
public function testDeprecatedTimezonesAreValidWithBC(string $timezone)
272272
{
273+
// Skip test if the timezone is not available in the current timezone database
274+
if (!\in_array($timezone, \DateTimeZone::listIdentifiers(\DateTimeZone::ALL_WITH_BC), true)) {
275+
$this->markTestSkipped(sprintf('Timezone "%s" is not available in the current timezone database', $timezone));
276+
}
277+
273278
$constraint = new Timezone(\DateTimeZone::ALL_WITH_BC);
274279

275280
$this->validator->validate($timezone, $constraint);

0 commit comments

Comments
 (0)