Skip to content

Commit 2d0d47e

Browse files
committed
Merge branch '2.7' into 2.8
* 2.7: [Intl][Form] Update tests, TimeZoneTransformer, and DateTimeToLocalizedStringTransformer for the GMT and UTC split in ICU [Intl] Update ICU data to 59.1
2 parents 1f4d614 + 3b0c0fc commit 2d0d47e

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

Tests/Extension/Core/DataTransformer/DateTimeToLocalizedStringTransformerTest.php

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,13 @@ public function dataProvider()
6161
array(\IntlDateFormatter::FULL, \IntlDateFormatter::NONE, null, 'Mittwoch, 3. Februar 2010', '2010-02-03 00:00:00 UTC'),
6262
array(null, \IntlDateFormatter::SHORT, null, '03.02.2010, 04:05', '2010-02-03 04:05:00 UTC'),
6363
array(null, \IntlDateFormatter::MEDIUM, null, '03.02.2010, 04:05:06', '2010-02-03 04:05:06 UTC'),
64-
array(null, \IntlDateFormatter::LONG, null, '03.02.2010, 04:05:06 GMT', '2010-02-03 04:05:06 UTC'),
64+
array(null, \IntlDateFormatter::LONG, null, '03.02.2010, 04:05:06 UTC', '2010-02-03 04:05:06 UTC'),
65+
array(null, \IntlDateFormatter::LONG, null, '03.02.2010, 04:05:06 UTC', '2010-02-03 04:05:06 GMT'),
6566
// see below for extra test case for time format FULL
6667
array(\IntlDateFormatter::NONE, \IntlDateFormatter::SHORT, null, '04:05', '1970-01-01 04:05:00 UTC'),
6768
array(\IntlDateFormatter::NONE, \IntlDateFormatter::MEDIUM, null, '04:05:06', '1970-01-01 04:05:06 UTC'),
68-
array(\IntlDateFormatter::NONE, \IntlDateFormatter::LONG, null, '04:05:06 GMT', '1970-01-01 04:05:06 UTC'),
69+
array(\IntlDateFormatter::NONE, \IntlDateFormatter::LONG, null, '04:05:06 UTC', '1970-01-01 04:05:06 GMT'),
70+
array(\IntlDateFormatter::NONE, \IntlDateFormatter::LONG, null, '04:05:06 UTC', '1970-01-01 04:05:06 UTC'),
6971
array(null, null, 'yyyy-MM-dd HH:mm:00', '2010-02-03 04:05:00', '2010-02-03 04:05:00 UTC'),
7072
array(null, null, 'yyyy-MM-dd HH:mm', '2010-02-03 04:05', '2010-02-03 04:05:00 UTC'),
7173
array(null, null, 'yyyy-MM-dd HH', '2010-02-03 04', '2010-02-03 04:00:00 UTC'),
@@ -85,6 +87,9 @@ public function dataProvider()
8587
*/
8688
public function testTransform($dateFormat, $timeFormat, $pattern, $output, $input)
8789
{
90+
IntlTestHelper::requireFullIntl($this, '59.1');
91+
\Locale::setDefault('de_AT');
92+
8893
$transformer = new DateTimeToLocalizedStringTransformer(
8994
'UTC',
9095
'UTC',
@@ -101,9 +106,12 @@ public function testTransform($dateFormat, $timeFormat, $pattern, $output, $inpu
101106

102107
public function testTransformFullTime()
103108
{
109+
IntlTestHelper::requireFullIntl($this, '59.1');
110+
\Locale::setDefault('de_AT');
111+
104112
$transformer = new DateTimeToLocalizedStringTransformer('UTC', 'UTC', null, \IntlDateFormatter::FULL);
105113

106-
$this->assertEquals('03.02.2010, 04:05:06 GMT', $transformer->transform($this->dateTime));
114+
$this->assertEquals('03.02.2010, 04:05:06 Koordinierte Weltzeit', $transformer->transform($this->dateTime));
107115
}
108116

109117
public function testTransformToDifferentLocale()

0 commit comments

Comments
 (0)