Files
PhpSpreadsheet/tests/data/Calculation/TextData/NUMBERVALUE.php
T
Adrien Crivelli ec4098c8fd Strict mode for all tests
While we might never be able to have 100% of our code strict, we can at
the very least do it for all of our tests. This ensures that our tests
are using our API with the types as intended by the test author, and not
silently be cast to what our API requires.
2023-09-07 17:44:56 +08:00

63 lines
1.3 KiB
PHP

<?php
declare(strict_types=1);
return [
[
1234567.89,
'1,234,567.890',
],
[
1234567.89,
'1 234 567,890', ',', ' ',
],
[
-1234567.89,
'-1 234 567,890', ',', ' ',
],
[
'#VALUE!',
'1 234 567,890-', ',', ' ',
],
[
'#VALUE!',
'1,234,567.890,123',
],
[
'#VALUE!',
'1.234.567.890,123',
],
[
1234567.890,
'1.234.567,890', ',', '.',
],
[
'#VALUE!',
'1.234.567,89',
],
[
12345.6789,
'1,234,567.89%',
],
[
123.456789,
'1,234,567.89%%',
],
[
1.23456789,
'1,234,567.89%%%',
],
[
'#VALUE!',
'1,234,567.89-%',
],
'no arguments' => ['exception'],
'boolean argument' => ['#VALUE!', true],
'slash as group separator' => [1234567.1, '1/234/567.1', '.', '/'],
'slash as decimal separator' => [1234567.1, '1,234,567/1', '/', ','],
'issue 3574 null string treated as 0' => [0, '', ',', ' '],
'issue 3574 one or more spaces treated as 0' => [0, ' ', ',', ' '],
'issue 3574 non-blank numeric string okay' => [2, ' 2 ', ',', ' '],
'issue 3574 non-blank non-numeric string invalid' => ['#VALUE!', ' x ', ',', ' '],
];