Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit d135e5c

Browse filesBrowse files
committed
[Intl] Make tests pass after the ICU data update
1 parent 65faa10 commit d135e5c
Copy full SHA for d135e5c

File tree

Expand file treeCollapse file tree

7 files changed

+22
-16
lines changed
Filter options
Expand file treeCollapse file tree

7 files changed

+22
-16
lines changed

‎src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToLocalizedStringTransformerTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToLocalizedStringTransformerTest.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ protected function setUp()
2424
parent::setUp();
2525

2626
// Since we test against "de_AT", we need the full implementation
27-
IntlTestHelper::requireFullIntl($this);
27+
IntlTestHelper::requireFullIntl($this, '57.1');
2828

2929
\Locale::setDefault('de_AT');
3030

‎src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/NumberToLocalizedStringTransformerTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/NumberToLocalizedStringTransformerTest.php
+9-5Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ public function testReverseTransform($to, $from, $locale)
228228
public function testReverseTransformWithGrouping($to, $from, $locale)
229229
{
230230
// Since we test against other locales, we need the full implementation
231-
IntlTestHelper::requireFullIntl($this, false);
231+
IntlTestHelper::requireFullIntl($this, '4.8.1.1');
232232

233233
\Locale::setDefault($locale);
234234

@@ -377,7 +377,7 @@ public function testReverseTransformDoesNotRoundIfNoScale()
377377
public function testDecimalSeparatorMayBeDotIfGroupingSeparatorIsNotDot()
378378
{
379379
// Since we test against other locales, we need the full implementation
380-
IntlTestHelper::requireFullIntl($this, false);
380+
IntlTestHelper::requireFullIntl($this, '4.8.1.1');
381381

382382
\Locale::setDefault('fr');
383383
$transformer = new NumberToLocalizedStringTransformer(null, true);
@@ -397,7 +397,7 @@ public function testDecimalSeparatorMayBeDotIfGroupingSeparatorIsNotDot()
397397
public function testDecimalSeparatorMayNotBeDotIfGroupingSeparatorIsDot()
398398
{
399399
// Since we test against "de_AT", we need the full implementation
400-
IntlTestHelper::requireFullIntl($this, false);
400+
IntlTestHelper::requireFullIntl($this, '4.8.1.1');
401401

402402
\Locale::setDefault('de_AT');
403403

@@ -412,7 +412,7 @@ public function testDecimalSeparatorMayNotBeDotIfGroupingSeparatorIsDot()
412412
public function testDecimalSeparatorMayNotBeDotIfGroupingSeparatorIsDotWithNoGroupSep()
413413
{
414414
// Since we test against "de_DE", we need the full implementation
415-
IntlTestHelper::requireFullIntl($this, false);
415+
IntlTestHelper::requireFullIntl($this, '4.8.1.1');
416416

417417
\Locale::setDefault('de_DE');
418418

@@ -436,7 +436,7 @@ public function testDecimalSeparatorMayBeDotIfGroupingSeparatorIsDotButNoGroupin
436436
public function testDecimalSeparatorMayBeCommaIfGroupingSeparatorIsNotComma()
437437
{
438438
// Since we test against other locales, we need the full implementation
439-
IntlTestHelper::requireFullIntl($this, false);
439+
IntlTestHelper::requireFullIntl($this, '4.8.1.1');
440440

441441
\Locale::setDefault('bg');
442442
$transformer = new NumberToLocalizedStringTransformer(null, true);
@@ -455,6 +455,8 @@ public function testDecimalSeparatorMayBeCommaIfGroupingSeparatorIsNotComma()
455455
*/
456456
public function testDecimalSeparatorMayNotBeCommaIfGroupingSeparatorIsComma()
457457
{
458+
IntlTestHelper::requireFullIntl($this, '4.8.1.1');
459+
458460
$transformer = new NumberToLocalizedStringTransformer(null, true);
459461

460462
$transformer->reverseTransform('1,234,5');
@@ -465,6 +467,8 @@ public function testDecimalSeparatorMayNotBeCommaIfGroupingSeparatorIsComma()
465467
*/
466468
public function testDecimalSeparatorMayNotBeCommaIfGroupingSeparatorIsCommaWithNoGroupSep()
467469
{
470+
IntlTestHelper::requireFullIntl($this, '4.8.1.1');
471+
468472
$transformer = new NumberToLocalizedStringTransformer(null, true);
469473

470474
$transformer->reverseTransform('1234,5');

‎src/Symfony/Component/Form/Tests/Extension/Core/Type/DateTypeTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Form/Tests/Extension/Core/Type/DateTypeTest.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@ public function testMonthsOption()
504504
public function testMonthsOptionShortFormat()
505505
{
506506
// we test against "de_AT", so we need the full implementation
507-
IntlTestHelper::requireFullIntl($this);
507+
IntlTestHelper::requireFullIntl($this, '57.1');
508508

509509
\Locale::setDefault('de_AT');
510510

‎src/Symfony/Component/Intl/Tests/NumberFormatter/AbstractNumberFormatterTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Intl/Tests/NumberFormatter/AbstractNumberFormatterTest.php
+5-3Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,16 +83,18 @@ public function formatCurrencyWithCurrencyStyleProvider()
8383
*/
8484
public function testFormatCurrencyWithCurrencyStyleCostaRicanColonsRounding($value, $currency, $symbol, $expected)
8585
{
86+
IntlTestHelper::requireIntl($this, '58.1');
87+
8688
$formatter = $this->getNumberFormatter('en', NumberFormatter::CURRENCY);
8789
$this->assertEquals(sprintf($expected, $symbol), $formatter->formatCurrency($value, $currency));
8890
}
8991

9092
public function formatCurrencyWithCurrencyStyleCostaRicanColonsRoundingProvider()
9193
{
9294
return array(
93-
array(100, 'CRC', 'CRC', '%s100'),
94-
array(-100, 'CRC', 'CRC', '-%s100'),
95-
array(1000.12, 'CRC', 'CRC', '%s1,000'),
95+
array(100, 'CRC', 'CRC', '%s100.00'),
96+
array(-100, 'CRC', 'CRC', '-%s100.00'),
97+
array(1000.12, 'CRC', 'CRC', '%s1,000.12'),
9698
);
9799
}
98100

‎src/Symfony/Component/Intl/Tests/NumberFormatter/Verification/NumberFormatterTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Intl/Tests/NumberFormatter/Verification/NumberFormatterTest.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public function testCreate()
3434

3535
public function testGetTextAttribute()
3636
{
37-
IntlTestHelper::requireFullIntl($this);
37+
IntlTestHelper::requireFullIntl($this, '57.1');
3838

3939
parent::testGetTextAttribute();
4040
}

‎src/Symfony/Component/Validator/Tests/Constraints/AbstractComparisonValidatorTestCase.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Validator/Tests/Constraints/AbstractComparisonValidatorTestCase.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ public function testInvalidComparisonToValue($dirtyValue, $dirtyValueAsString, $
128128
// Conversion of dates to string differs between ICU versions
129129
// Make sure we have the correct version loaded
130130
if ($dirtyValue instanceof \DateTime || $dirtyValue instanceof \DateTimeInterface) {
131-
IntlTestHelper::requireIntl($this);
131+
IntlTestHelper::requireIntl($this, '57.1');
132132

133133
if (PHP_VERSION_ID < 50304 && !(extension_loaded('intl') && method_exists('IntlDateFormatter', 'setTimeZone'))) {
134134
$this->markTestSkipped('Intl supports formatting DateTime objects since 5.3.4');

‎src/Symfony/Component/Validator/Tests/Constraints/RangeValidatorTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Validator/Tests/Constraints/RangeValidatorTest.php
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ public function testInvalidDatesMin($value, $dateTimeAsString)
287287
{
288288
// Conversion of dates to string differs between ICU versions
289289
// Make sure we have the correct version loaded
290-
IntlTestHelper::requireIntl($this);
290+
IntlTestHelper::requireIntl($this, '57.1');
291291

292292
$constraint = new Range(array(
293293
'min' => 'March 10, 2014',
@@ -310,7 +310,7 @@ public function testInvalidDatesMax($value, $dateTimeAsString)
310310
{
311311
// Conversion of dates to string differs between ICU versions
312312
// Make sure we have the correct version loaded
313-
IntlTestHelper::requireIntl($this);
313+
IntlTestHelper::requireIntl($this, '57.1');
314314

315315
$constraint = new Range(array(
316316
'max' => 'March 20, 2014',
@@ -333,7 +333,7 @@ public function testInvalidDatesCombinedMax($value, $dateTimeAsString)
333333
{
334334
// Conversion of dates to string differs between ICU versions
335335
// Make sure we have the correct version loaded
336-
IntlTestHelper::requireIntl($this);
336+
IntlTestHelper::requireIntl($this, '57.1');
337337

338338
$constraint = new Range(array(
339339
'min' => 'March 10, 2014',
@@ -358,7 +358,7 @@ public function testInvalidDatesCombinedMin($value, $dateTimeAsString)
358358
{
359359
// Conversion of dates to string differs between ICU versions
360360
// Make sure we have the correct version loaded
361-
IntlTestHelper::requireIntl($this);
361+
IntlTestHelper::requireIntl($this, '57.1');
362362

363363
$constraint = new Range(array(
364364
'min' => 'March 10, 2014',

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.