@@ -51,17 +51,17 @@ public static function assertEquals($expected, $actual, $message = '', $delta =
51
51
public function dataProvider ()
52
52
{
53
53
return array (
54
- array (\IntlDateFormatter::SHORT , null , null , '03.02.10 04:05 ' , '2010-02-03 04:05:00 UTC ' ),
55
- array (\IntlDateFormatter::MEDIUM , null , null , '03.02.2010 04:05 ' , '2010-02-03 04:05:00 UTC ' ),
56
- array (\IntlDateFormatter::LONG , null , null , '03 . Februar 2010 04:05 ' , '2010-02-03 04:05:00 UTC ' ),
57
- array (\IntlDateFormatter::FULL , null , null , 'Mittwoch, 03 . Februar 2010 04:05 ' , '2010-02-03 04:05:00 UTC ' ),
54
+ array (\IntlDateFormatter::SHORT , null , null , '03.02.10, 04:05 ' , '2010-02-03 04:05:00 UTC ' ),
55
+ array (\IntlDateFormatter::MEDIUM , null , null , '03.02.2010, 04:05 ' , '2010-02-03 04:05:00 UTC ' ),
56
+ array (\IntlDateFormatter::LONG , null , null , '3 . Februar 2010 um 04:05 ' , '2010-02-03 04:05:00 UTC ' ),
57
+ array (\IntlDateFormatter::FULL , null , null , 'Mittwoch, 3 . Februar 2010 um 04:05 ' , '2010-02-03 04:05:00 UTC ' ),
58
58
array (\IntlDateFormatter::SHORT , \IntlDateFormatter::NONE , null , '03.02.10 ' , '2010-02-03 00:00:00 UTC ' ),
59
59
array (\IntlDateFormatter::MEDIUM , \IntlDateFormatter::NONE , null , '03.02.2010 ' , '2010-02-03 00:00:00 UTC ' ),
60
- array (\IntlDateFormatter::LONG , \IntlDateFormatter::NONE , null , '03 . Februar 2010 ' , '2010-02-03 00:00:00 UTC ' ),
61
- array (\IntlDateFormatter::FULL , \IntlDateFormatter::NONE , null , 'Mittwoch, 03 . Februar 2010 ' , '2010-02-03 00:00:00 UTC ' ),
62
- array (null , \IntlDateFormatter::SHORT , null , '03.02.2010 04:05 ' , '2010-02-03 04:05:00 UTC ' ),
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 ' ),
60
+ array (\IntlDateFormatter::LONG , \IntlDateFormatter::NONE , null , '3 . Februar 2010 ' , '2010-02-03 00:00:00 UTC ' ),
61
+ array (\IntlDateFormatter::FULL , \IntlDateFormatter::NONE , null , 'Mittwoch, 3 . Februar 2010 ' , '2010-02-03 00:00:00 UTC ' ),
62
+ array (null , \IntlDateFormatter::SHORT , null , '03.02.2010, 04:05 ' , '2010-02-03 04:05:00 UTC ' ),
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 ' ),
65
65
// see below for extra test case for time format FULL
66
66
array (\IntlDateFormatter::NONE , \IntlDateFormatter::SHORT , null , '04:05 ' , '1970-01-01 04:05:00 UTC ' ),
67
67
array (\IntlDateFormatter::NONE , \IntlDateFormatter::MEDIUM , null , '04:05:06 ' , '1970-01-01 04:05:06 UTC ' ),
@@ -103,7 +103,7 @@ public function testTransformFullTime()
103
103
{
104
104
$ transformer = new DateTimeToLocalizedStringTransformer ('UTC ' , 'UTC ' , null , \IntlDateFormatter::FULL );
105
105
106
- $ this ->assertEquals ('03.02.2010 04:05:06 GMT ' , $ transformer ->transform ($ this ->dateTime ));
106
+ $ this ->assertEquals ('03.02.2010, 04:05:06 GMT ' , $ transformer ->transform ($ this ->dateTime ));
107
107
}
108
108
109
109
public function testTransformToDifferentLocale ()
@@ -131,7 +131,7 @@ public function testTransformWithDifferentTimezones()
131
131
$ dateTime = clone $ input ;
132
132
$ dateTime ->setTimezone (new \DateTimeZone ('Asia/Hong_Kong ' ));
133
133
134
- $ this ->assertEquals ($ dateTime ->format ('d.m.Y H:i ' ), $ transformer ->transform ($ input ));
134
+ $ this ->assertEquals ($ dateTime ->format ('d.m.Y, H:i ' ), $ transformer ->transform ($ input ));
135
135
}
136
136
137
137
public function testTransformWithDifferentPatterns ()
@@ -153,7 +153,7 @@ public function testTransformDateTimeImmutableTimezones()
153
153
$ dateTime = clone $ input ;
154
154
$ dateTime = $ dateTime ->setTimezone (new \DateTimeZone ('Asia/Hong_Kong ' ));
155
155
156
- $ this ->assertEquals ($ dateTime ->format ('d.m.Y H:i ' ), $ transformer ->transform ($ input ));
156
+ $ this ->assertEquals ($ dateTime ->format ('d.m.Y, H:i ' ), $ transformer ->transform ($ input ));
157
157
}
158
158
159
159
/**
@@ -201,7 +201,7 @@ public function testReverseTransformFullTime()
201
201
{
202
202
$ transformer = new DateTimeToLocalizedStringTransformer ('UTC ' , 'UTC ' , null , \IntlDateFormatter::FULL );
203
203
204
- $ this ->assertDateTimeEquals ($ this ->dateTime , $ transformer ->reverseTransform ('03.02.2010 04:05:06 GMT+00:00 ' ));
204
+ $ this ->assertDateTimeEquals ($ this ->dateTime , $ transformer ->reverseTransform ('03.02.2010, 04:05:06 GMT+00:00 ' ));
205
205
}
206
206
207
207
public function testReverseTransformFromDifferentLocale ()
@@ -220,7 +220,7 @@ public function testReverseTransformWithDifferentTimezones()
220
220
$ dateTime = new \DateTime ('2010-02-03 04:05:00 Asia/Hong_Kong ' );
221
221
$ dateTime ->setTimezone (new \DateTimeZone ('America/New_York ' ));
222
222
223
- $ this ->assertDateTimeEquals ($ dateTime , $ transformer ->reverseTransform ('03.02.2010 04:05 ' ));
223
+ $ this ->assertDateTimeEquals ($ dateTime , $ transformer ->reverseTransform ('03.02.2010, 04:05 ' ));
224
224
}
225
225
226
226
public function testReverseTransformWithDifferentPatterns ()
0 commit comments