Files
PhpSpreadsheet/tests/data/Calculation/TextData/REPLACE.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

87 lines
1.9 KiB
PHP

<?php
declare(strict_types=1);
return [
[
'QWDFGYUIOP',
'QWERTYUIOP',
3,
3,
'DFG',
],
[
'QWERDFGIOP',
'QWERTYUIOP',
5,
3,
'DFG',
],
[
'QWDFGERTYUIOP',
'QWERTYUIOP',
3,
0,
'DFG',
],
[
'QWERDFGTYUIOP',
'QWERTYUIOP',
5,
0,
'DFG',
],
[
'Ενα δύοτρίατέσσεραπέντε',
'Εναδύοτρίατέσσεραπέντε',
4,
0,
' ',
],
[
'Ενα δύο τρίατέσσεραπέντε',
'Ενα δύοτρίατέσσεραπέντε',
8,
0,
' ',
],
[
'Ενα δύο τρία τέσσεραπέντε',
'Ενα δύο τρίατέσσεραπέντε',
13,
0,
' ',
],
[
'Ενα δύο τρία τέσσερα πέντε',
'Ενα δύο τρία τέσσεραπέντε',
21,
0,
' ',
],
'no arguments' => ['exception'],
'one argument' => ['exception', 'hello'],
'two arguments' => ['exception', 'hello', 2],
'three arguments' => ['exception', 'hello', 2, 2],
'position zero' => ['#VALUE!', 'hello', 0, 2, 'xyz'],
'negative length' => ['#VALUE!', 'hello', 3, -1, 'xyz'],
'boolean 1st parm' => ['TRDFGE', true, 3, 1, 'DFG'],
'boolean 4th parm' => ['heFALSElo', 'hello', 3, 1, false],
'propagate REF' => ['#REF!', '=sheet99!A1', 3, 1, 'x'],
'propagate DIV0' => ['#DIV/0!', '=1/0', 3, 1, 'x'],
'string which just sneaks in' => [
str_repeat('A', 32766) . 'C',
str_repeat('A', 32766) . 'B',
32767,
'1',
'C',
],
'string which overflows' => [
'#VALUE!',
str_repeat('A', 32766) . 'B',
32767,
'1',
'CC',
],
];