[Intl] Skip test cases that produce a TypeError on php 8.
This commit is contained in:
parent
9460894ae2
commit
7f1055b97c
@ -377,14 +377,16 @@ abstract class AbstractNumberFormatterTest extends TestCase
|
|||||||
|
|
||||||
public function formatFractionDigitsProvider()
|
public function formatFractionDigitsProvider()
|
||||||
{
|
{
|
||||||
return [
|
yield [1.123, '1.123', null, 0];
|
||||||
[1.123, '1.123', null, 0],
|
yield [1.123, '1', 0, 0];
|
||||||
[1.123, '1', 0, 0],
|
yield [1.123, '1.1', 1, 1];
|
||||||
[1.123, '1.1', 1, 1],
|
yield [1.123, '1.12', 2, 2];
|
||||||
[1.123, '1.12', 2, 2],
|
yield [1.123, '1.123', -1, 0];
|
||||||
[1.123, '1.123', -1, 0],
|
|
||||||
[1.123, '1', 'abc', 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()
|
public function formatGroupingUsedProvider()
|
||||||
{
|
{
|
||||||
return [
|
yield [1000, '1,000', null, 1];
|
||||||
[1000, '1,000', null, 1],
|
yield [1000, '1000', 0, 0];
|
||||||
[1000, '1000', 0, 0],
|
yield [1000, '1,000', 1, 1];
|
||||||
[1000, '1,000', 1, 1],
|
yield [1000, '1,000', 2, 1];
|
||||||
[1000, '1,000', 2, 1],
|
yield [1000, '1,000', -1, 1];
|
||||||
[1000, '1000', 'abc', 0],
|
|
||||||
[1000, '1,000', -1, 1],
|
if (\PHP_VERSION_ID < 80000) {
|
||||||
];
|
// This dataset will produce a TypeError on php 8.
|
||||||
|
yield [1000, '1000', 'abc', 0];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user