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 7f1055b

Browse filesBrowse files
committed
[Intl] Skip test cases that produce a TypeError on php 8.
1 parent 9460894 commit 7f1055b
Copy full SHA for 7f1055b

File tree

1 file changed

+20
-16
lines changed
Filter options

1 file changed

+20
-16
lines changed

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

Copy file name to clipboardExpand all lines: src/Symfony/Component/Intl/Tests/NumberFormatter/AbstractNumberFormatterTest.php
+20-16Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -377,14 +377,16 @@ public function testFormatFractionDigits($value, $expected, $fractionDigits = nu
377377

378378
public function formatFractionDigitsProvider()
379379
{
380-
return [
381-
[1.123, '1.123', null, 0],
382-
[1.123, '1', 0, 0],
383-
[1.123, '1.1', 1, 1],
384-
[1.123, '1.12', 2, 2],
385-
[1.123, '1.123', -1, 0],
386-
[1.123, '1', 'abc', 0],
387-
];
380+
yield [1.123, '1.123', null, 0];
381+
yield [1.123, '1', 0, 0];
382+
yield [1.123, '1.1', 1, 1];
383+
yield [1.123, '1.12', 2, 2];
384+
yield [1.123, '1.123', -1, 0];
385+
386+
if (\PHP_VERSION_ID < 80000) {
387+
// This dataset will produce a TypeError on php 8.
388+
yield [1.123, '1', 'abc', 0];
389+
}
388390
}
389391

390392
/**
@@ -410,14 +412,16 @@ public function testFormatGroupingUsed($value, $expected, $groupingUsed = null,
410412

411413
public function formatGroupingUsedProvider()
412414
{
413-
return [
414-
[1000, '1,000', null, 1],
415-
[1000, '1000', 0, 0],
416-
[1000, '1,000', 1, 1],
417-
[1000, '1,000', 2, 1],
418-
[1000, '1000', 'abc', 0],
419-
[1000, '1,000', -1, 1],
420-
];
415+
yield [1000, '1,000', null, 1];
416+
yield [1000, '1000', 0, 0];
417+
yield [1000, '1,000', 1, 1];
418+
yield [1000, '1,000', 2, 1];
419+
yield [1000, '1,000', -1, 1];
420+
421+
if (\PHP_VERSION_ID < 80000) {
422+
// This dataset will produce a TypeError on php 8.
423+
yield [1000, '1000', 'abc', 0];
424+
}
421425
}
422426

423427
/**

0 commit comments

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