[Intl] Skip test cases that produce a TypeError on php 8.

This commit is contained in:
Alexander M. Turek 2020-09-05 18:44:57 +02:00
parent 9460894ae2
commit 7f1055b97c

View File

@ -377,14 +377,16 @@ abstract class AbstractNumberFormatterTest extends TestCase
public function formatFractionDigitsProvider()
{
return [
[1.123, '1.123', null, 0],
[1.123, '1', 0, 0],
[1.123, '1.1', 1, 1],
[1.123, '1.12', 2, 2],
[1.123, '1.123', -1, 0],
[1.123, '1', 'abc', 0],
];
yield [1.123, '1.123', null, 0];
yield [1.123, '1', 0, 0];
yield [1.123, '1.1', 1, 1];
yield [1.123, '1.12', 2, 2];
yield [1.123, '1.123', -1, 0];
if (\PHP_VERSION_ID < 80000) {
// This dataset will produce a TypeError on php 8.
yield [1.123, '1', 'abc', 0];
}
}
/**
@ -410,14 +412,16 @@ abstract class AbstractNumberFormatterTest extends TestCase
public function formatGroupingUsedProvider()
{
return [
[1000, '1,000', null, 1],
[1000, '1000', 0, 0],
[1000, '1,000', 1, 1],
[1000, '1,000', 2, 1],
[1000, '1000', 'abc', 0],
[1000, '1,000', -1, 1],
];
yield [1000, '1,000', null, 1];
yield [1000, '1000', 0, 0];
yield [1000, '1,000', 1, 1];
yield [1000, '1,000', 2, 1];
yield [1000, '1,000', -1, 1];
if (\PHP_VERSION_ID < 80000) {
// This dataset will produce a TypeError on php 8.
yield [1000, '1000', 'abc', 0];
}
}
/**