mirror of
https://github.com/PHPOffice/PhpSpreadsheet.git
synced 2026-08-20 09:23:35 +00:00
ec4098c8fd
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.
109 lines
1.5 KiB
PHP
109 lines
1.5 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
return [
|
|
[
|
|
'',
|
|
null,
|
|
1,
|
|
1,
|
|
],
|
|
[
|
|
'',
|
|
'',
|
|
1,
|
|
1,
|
|
],
|
|
[
|
|
'#VALUE!',
|
|
'QWERTYUIOP',
|
|
0,
|
|
1,
|
|
],
|
|
[
|
|
'#VALUE!',
|
|
'QWERTYUIOP',
|
|
5,
|
|
-1,
|
|
],
|
|
[
|
|
'#VALUE!',
|
|
'QWERTYUIOP',
|
|
'NaN',
|
|
1,
|
|
],
|
|
[
|
|
'#VALUE!',
|
|
'QWERTYUIOP',
|
|
2,
|
|
'NaN',
|
|
],
|
|
'length null treated as zero' => [
|
|
'',
|
|
'QWERTYUIOP',
|
|
2,
|
|
null,
|
|
],
|
|
'length not specified' => [
|
|
'exception',
|
|
'QWERTYUIOP',
|
|
5,
|
|
],
|
|
'start not specified' => [
|
|
'exception',
|
|
'QWERTYUIOP',
|
|
],
|
|
'string not specified' => [
|
|
'exception',
|
|
],
|
|
[
|
|
'IOP',
|
|
'QWERTYUIOP',
|
|
8,
|
|
20,
|
|
],
|
|
[
|
|
'',
|
|
'QWERTYUIOP',
|
|
999,
|
|
2,
|
|
],
|
|
[
|
|
'DEF',
|
|
'ABCDEFGHI',
|
|
4,
|
|
3,
|
|
],
|
|
[
|
|
'δύο',
|
|
'Ενα δύο τρία τέσσερα πέντε',
|
|
5,
|
|
3,
|
|
],
|
|
[
|
|
'δύο τρία',
|
|
'Ενα δύο τρία τέσσερα πέντε',
|
|
5,
|
|
8,
|
|
],
|
|
[
|
|
'τρία τέσσερα',
|
|
'Ενα δύο τρία τέσσερα πέντε',
|
|
9,
|
|
12,
|
|
],
|
|
[
|
|
'R',
|
|
true,
|
|
2,
|
|
1,
|
|
],
|
|
[
|
|
'AL',
|
|
false,
|
|
2,
|
|
2,
|
|
],
|
|
];
|