Skip to content

Commit 30ddd64

Browse files
Merge branch '2.3' into 2.7
* 2.3: [HttpFoundation] Fix transient test [HttpFoundation] Add a dependency on the mbstring polyfill add readme files where missing Don't use reflections when possible [Form] Update form tests after the ICU data update [Intl] Update tests and the number formatter to match behaviour of the intl extension [Intl] Update the ICU data to version 55 [Intl] Fix the update-data.php script in preparation for ICU 5.5 Use constant instead of function call. fixed test name automatically generate safe fallback filename Conflicts: src/Symfony/Component/Debug/Debug.php src/Symfony/Component/HttpFoundation/composer.json src/Symfony/Component/Serializer/Tests/Normalizer/GetSetMethodNormalizerTest.php
2 parents 9a88a6c + 531a443 commit 30ddd64

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

Tests/Extension/Core/DataTransformer/DateTimeToLocalizedStringTransformerTest.php

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -51,17 +51,17 @@ public static function assertEquals($expected, $actual, $message = '', $delta =
5151
public function dataProvider()
5252
{
5353
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'),
5858
array(\IntlDateFormatter::SHORT, \IntlDateFormatter::NONE, null, '03.02.10', '2010-02-03 00:00:00 UTC'),
5959
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'),
6565
// see below for extra test case for time format FULL
6666
array(\IntlDateFormatter::NONE, \IntlDateFormatter::SHORT, null, '04:05', '1970-01-01 04:05:00 UTC'),
6767
array(\IntlDateFormatter::NONE, \IntlDateFormatter::MEDIUM, null, '04:05:06', '1970-01-01 04:05:06 UTC'),
@@ -103,7 +103,7 @@ public function testTransformFullTime()
103103
{
104104
$transformer = new DateTimeToLocalizedStringTransformer('UTC', 'UTC', null, \IntlDateFormatter::FULL);
105105

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));
107107
}
108108

109109
public function testTransformToDifferentLocale()
@@ -131,7 +131,7 @@ public function testTransformWithDifferentTimezones()
131131
$dateTime = clone $input;
132132
$dateTime->setTimezone(new \DateTimeZone('Asia/Hong_Kong'));
133133

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));
135135
}
136136

137137
public function testTransformWithDifferentPatterns()
@@ -153,7 +153,7 @@ public function testTransformDateTimeImmutableTimezones()
153153
$dateTime = clone $input;
154154
$dateTime = $dateTime->setTimezone(new \DateTimeZone('Asia/Hong_Kong'));
155155

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));
157157
}
158158

159159
/**
@@ -201,7 +201,7 @@ public function testReverseTransformFullTime()
201201
{
202202
$transformer = new DateTimeToLocalizedStringTransformer('UTC', 'UTC', null, \IntlDateFormatter::FULL);
203203

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'));
205205
}
206206

207207
public function testReverseTransformFromDifferentLocale()
@@ -220,7 +220,7 @@ public function testReverseTransformWithDifferentTimezones()
220220
$dateTime = new \DateTime('2010-02-03 04:05:00 Asia/Hong_Kong');
221221
$dateTime->setTimezone(new \DateTimeZone('America/New_York'));
222222

223-
$this->assertDateTimeEquals($dateTime, $transformer->reverseTransform('03.02.2010 04:05'));
223+
$this->assertDateTimeEquals($dateTime, $transformer->reverseTransform('03.02.2010, 04:05'));
224224
}
225225

226226
public function testReverseTransformWithDifferentPatterns()

Tests/Extension/Core/Type/DateTypeTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,7 @@ public function testMonthsOptionShortFormat()
487487
$view = $form->createView();
488488

489489
$this->assertEquals(array(
490-
new ChoiceView(1, '1', 'Jän'),
490+
new ChoiceView(1, '1', 'Jän.'),
491491
new ChoiceView(4, '4', 'Apr.'),
492492
), $view['month']->vars['choices']);
493493
}

0 commit comments

Comments
 (0)