mirror of
https://github.com/PHPOffice/PhpSpreadsheet.git
synced 2026-08-25 03:08:20 +00:00
3697352e28
* 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.
46 lines
796 B
PHP
46 lines
796 B
PHP
<?php
|
|
|
|
return [
|
|
'no arguments' => [
|
|
'exception',
|
|
],
|
|
'1 argument true' => [
|
|
'exception',
|
|
true,
|
|
],
|
|
'1 argument false' => [
|
|
'exception',
|
|
false,
|
|
],
|
|
'value_if_false omitted condtion is true' => [
|
|
'ABC',
|
|
true,
|
|
'ABC',
|
|
],
|
|
'value_if_false omitted condition is false' => [
|
|
false,
|
|
false,
|
|
'ABC',
|
|
],
|
|
'value_if_true omitted condition is true' => [0, true, null, 'error'],
|
|
'value_if_true omitted condition is false' => ['error', false, null, 'error'],
|
|
[
|
|
'ABC',
|
|
true,
|
|
'ABC',
|
|
'XYZ',
|
|
],
|
|
[
|
|
'XYZ',
|
|
false,
|
|
'ABC',
|
|
'XYZ',
|
|
],
|
|
[
|
|
'#N/A',
|
|
'#N/A',
|
|
'ABC',
|
|
'XYZ',
|
|
],
|
|
];
|