mirror of
https://github.com/PHPOffice/PhpSpreadsheet.git
synced 2026-08-23 20:12:33 +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.
78 lines
1.1 KiB
PHP
78 lines
1.1 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
return [
|
|
'no arguments' => [
|
|
'exception',
|
|
],
|
|
'only argument is null reference' => [
|
|
'#VALUE!',
|
|
null,
|
|
],
|
|
[
|
|
false,
|
|
true, true,
|
|
],
|
|
[
|
|
true,
|
|
true, false, false,
|
|
],
|
|
[
|
|
true,
|
|
true, false,
|
|
],
|
|
[
|
|
true,
|
|
false, true,
|
|
],
|
|
[
|
|
false,
|
|
false, false,
|
|
],
|
|
[
|
|
false,
|
|
true, true, false, false,
|
|
],
|
|
[
|
|
true,
|
|
true, true, true, false,
|
|
],
|
|
'ignore string other two should be true' => [
|
|
false,
|
|
'TRUE',
|
|
1,
|
|
0.5,
|
|
],
|
|
[
|
|
true,
|
|
'FALSE',
|
|
1.5,
|
|
0,
|
|
],
|
|
'only arg is string' => [
|
|
'#VALUE!',
|
|
'HELLO WORLD',
|
|
],
|
|
'true string is ignored' => [
|
|
true,
|
|
'TRUE',
|
|
1,
|
|
],
|
|
'false string is ignored' => [
|
|
true,
|
|
'FALSE',
|
|
true,
|
|
],
|
|
'string 1 is ignored' => [
|
|
true,
|
|
'1',
|
|
true,
|
|
],
|
|
'non-boolean string is ignored' => [
|
|
true,
|
|
'ABCD',
|
|
1,
|
|
],
|
|
];
|