mirror of
https://github.com/PHPOffice/PhpSpreadsheet.git
synced 2026-09-01 13:08:50 +00:00
a91dd60a98
Also enforce more rigorous Excel Function implementation by testing the underlying implementation, call via the Calc Engine, and execution from in a worksheet. Separate out unhappy path (exception) checks into a separate test, so that a single test isn't made overcomplex checking for every potentiality. Scrutinizer may dislike variadics, for variable number of arguments of mixed type; but tough. It's 100% valid PHP, accepted by phpstan, and makes life a lot easier. Initial work here covers all the database and datetime unit tests for Excel function implementations.
35 lines
661 B
PHP
35 lines
661 B
PHP
<?php
|
|
|
|
use PhpOffice\PhpSpreadsheet\Calculation\Information\ExcelError;
|
|
|
|
return [
|
|
[51, '21-Dec-2000'],
|
|
[52, '2000-01-01'],
|
|
[1, '2000-01-03'],
|
|
[52, '1995-01-01'],
|
|
[1, '1995-01-07'],
|
|
[2, '1995-01-10'],
|
|
[1, '2018-01-01'],
|
|
[ExcelError::VALUE(), '1800-01-01'],
|
|
[52, false],
|
|
[52, true],
|
|
[52, 0],
|
|
[52, 1],
|
|
[1, 2],
|
|
[1, 8],
|
|
[2, 9],
|
|
[53, '1904-01-01'],
|
|
[52, '1900-01-01'],
|
|
[1, '1900-01-07'],
|
|
[1, '1900-01-08'],
|
|
[2, '1900-01-09'],
|
|
[9, '1900-03-04'],
|
|
[10, '1900-03-05'],
|
|
[ExcelError::NAN(), -1],
|
|
[39, 1000],
|
|
[25, '2001'],
|
|
[25, 2002],
|
|
[25, 2003],
|
|
[26, 2004],
|
|
];
|