mirror of
https://github.com/PHPOffice/PhpSpreadsheet.git
synced 2026-08-24 14:28:38 +00:00
ac5299b5df
* Minor Fix for AND/OR/XOR These 3 fall into the set of functions where Excel treats string literals differently depending on whether they are passed to the function directly or as a cell reference. PhpSpreadsheet is updated to try to duplicate that logic. New tests are added. Some existing test results had to change as a result of this code change. * Adopt A Suggestion From Mark Baker Reduce if statements by adding functions.
76 lines
1.1 KiB
PHP
76 lines
1.1 KiB
PHP
<?php
|
|
|
|
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,
|
|
],
|
|
];
|