@@ -61,11 +61,13 @@ public function dataProvider()
61
61
array (\IntlDateFormatter::FULL , \IntlDateFormatter::NONE , null , 'Mittwoch, 3. Februar 2010 ' , '2010-02-03 00:00:00 UTC ' ),
62
62
array (null , \IntlDateFormatter::SHORT , null , '03.02.2010, 04:05 ' , '2010-02-03 04:05:00 UTC ' ),
63
63
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 ' ),
65
66
// see below for extra test case for time format FULL
66
67
array (\IntlDateFormatter::NONE , \IntlDateFormatter::SHORT , null , '04:05 ' , '1970-01-01 04:05:00 UTC ' ),
67
68
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 ' ),
69
71
array (null , null , 'yyyy-MM-dd HH:mm:00 ' , '2010-02-03 04:05:00 ' , '2010-02-03 04:05:00 UTC ' ),
70
72
array (null , null , 'yyyy-MM-dd HH:mm ' , '2010-02-03 04:05 ' , '2010-02-03 04:05:00 UTC ' ),
71
73
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()
85
87
*/
86
88
public function testTransform ($ dateFormat , $ timeFormat , $ pattern , $ output , $ input )
87
89
{
90
+ IntlTestHelper::requireFullIntl ($ this , '59.1 ' );
91
+ \Locale::setDefault ('de_AT ' );
92
+
88
93
$ transformer = new DateTimeToLocalizedStringTransformer (
89
94
'UTC ' ,
90
95
'UTC ' ,
@@ -101,9 +106,12 @@ public function testTransform($dateFormat, $timeFormat, $pattern, $output, $inpu
101
106
102
107
public function testTransformFullTime ()
103
108
{
109
+ IntlTestHelper::requireFullIntl ($ this , '59.1 ' );
110
+ \Locale::setDefault ('de_AT ' );
111
+
104
112
$ transformer = new DateTimeToLocalizedStringTransformer ('UTC ' , 'UTC ' , null , \IntlDateFormatter::FULL );
105
113
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 ));
107
115
}
108
116
109
117
public function testTransformToDifferentLocale ()
0 commit comments