Skip to content

Commit 804b39c

Browse files
committed
minor #22761 [Intl] Fix intl tests for PHP < 5.5.10 (ogizanagi)
This PR was merged into the 2.7 branch. Discussion ---------- [Intl] Fix intl tests for PHP < 5.5.10 | Q | A | ------------- | --- | Branch? | 2.7 | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | N/A | License | MIT | Doc PR | N/A Should fix tests in upper branches (see symfony/symfony#22760). Commits ------- fab0629206 [Intl] Fix intl tests for PHP < 5.5.10
2 parents 06080d5 + aade036 commit 804b39c

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

Tests/DateFormatter/AbstractIntlDateFormatterTest.php

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ public function formatWithTimezoneProvider()
342342

343343
/**
344344
* @dataProvider formatTimezoneProvider
345-
* @requires PHP 5.5
345+
* @requires PHP 5.5.10
346346
*/
347347
public function testFormatTimezone($pattern, $timezone, $expected)
348348
{
@@ -459,15 +459,11 @@ public function testFormatWithConstructorTimezone()
459459
);
460460
}
461461

462+
/**
463+
* @requires PHP 5.5.10
464+
*/
462465
public function testFormatWithDateTimeZoneGmt()
463466
{
464-
if (PHP_VERSION_ID < 50500 && !(extension_loaded('intl') && method_exists('IntlDateFormatter', 'setTimeZone'))) {
465-
$this->markTestSkipped('Only in PHP 5.5+ IntlDateFormatter allows to use DateTimeZone objects.');
466-
}
467-
if (PHP_VERSION_ID < 50510) {
468-
$this->markTestSkipped('Before PHP 5.5.10 the GMT timezone used to be converted to UTC.');
469-
}
470-
471467
$formatter = $this->getDateFormatter('en', IntlDateFormatter::MEDIUM, IntlDateFormatter::SHORT, new \DateTimeZone('GMT'), IntlDateFormatter::GREGORIAN, 'zzz');
472468

473469
$this->assertEquals('GMT', $formatter->format(0));

0 commit comments

Comments
 (0)