mirror of
https://github.com/PHPOffice/PhpSpreadsheet.git
synced 2026-08-20 16:30:41 +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.
23 lines
915 B
PHP
23 lines
915 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
return [
|
|
'both boolean true' => [false, 'true, true'],
|
|
'boolean xor string-true' => [false, 'true, "true"'],
|
|
'true xor non-boolean-string' => [true, 'true, "xyz"'],
|
|
'non-boolean-string xor true' => [true, '"xyz", true'],
|
|
'empty-string xor true' => [true, '"", true'],
|
|
'non-boolean-string xor false' => [false, 'false, "xyz"'],
|
|
'false xor non-boolean-string' => [false, '"xyz", false'],
|
|
'only non-boolean-string' => ['#VALUE!', '"xyz"'],
|
|
'only boolean-string' => [true, '"true"'],
|
|
'numeric-true xor true xor true' => [true, '3.1, true, true'],
|
|
'numeric-false xor true xor true' => [false, '0, true, true'],
|
|
'mixed boolean' => [true, 'true, true, true, false'],
|
|
'only true' => [true, 'true'],
|
|
'only false' => [false, 0.0],
|
|
'boolean in array' => [true, '{true}'],
|
|
'boolean-string in array' => ['#VALUE!', '{"true"}'],
|
|
];
|