Files
PhpSpreadsheet/tests/data/Calculation/Logical/XOR.php
T
oleibman ac5299b5df Minor Fix for AND/OR/XOR (#3287)
* 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.
2023-01-16 05:35:28 -08:00

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,
],
];