Files
PhpSpreadsheet/tests/data/Calculation/Logical/AND.php
T
oleibman 3697352e28 Fix Unintential Deprecated Calls in Tests - LOGICAL (#3178)
* Fix Unintential Deprecated Calls in Tests - LOGICAL

I think it's best to install these before PR #3166. There are no changes to source code, only to doc-blocks and to test members which continue to inadvertently use calls to deprecated functions.

* Change Unit Tests to Run in Spreadsheet Context

They had been run as direct calls, which is not how most users would use them. Making this change exposed some minor coding errors - SWITCH needs to flatten its arguments, and IFERROR and IFNA were not handling a null testValue in the same manner as Excel.
2022-11-23 07:49:28 -08:00

124 lines
1.5 KiB
PHP

<?php
return [
'no arguments' => [
'exception',
],
// NULL
[
false,
null,
],
// Boolean TRUE and NULL
[
true,
true,
null,
],
// Boolean FALSE and NULL
[
false,
false,
null,
],
// Both TRUE Booleans
[
true,
true,
true,
],
// Mixed Booleans
[
false,
true,
false,
],
// Mixed Booleans
[
false,
false,
true,
],
// Both FALSE Booleans
[
false,
false,
false,
],
// Multiple Mixed Booleans
[
false,
true,
true,
false,
],
// Multiple TRUE Booleans
[
true,
true,
true,
true,
],
// Multiple FALSE Booleans
[
false,
false,
false,
false,
false,
],
[
true,
-1,
-2,
],
[
false,
0,
0,
],
[
false,
0,
1,
],
[
true,
1,
1,
],
[
'#VALUE!',
'1',
1,
],
// 'TRUE' String
[
true,
'TRUE',
1,
],
// 'FALSE' String
[
false,
'FALSE',
true,
],
// Non-numeric String
[
'#VALUE!',
'ABCD',
1,
],
[
true,
-2,
1,
],
[
false,
-2,
0,
],
];