mirror of
https://github.com/PHPOffice/PhpSpreadsheet.git
synced 2026-08-25 21:58:18 +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.
36 lines
1.4 KiB
PHP
36 lines
1.4 KiB
PHP
<?php
|
|
|
|
use PhpOffice\PhpSpreadsheet\Calculation\Information\ExcelError;
|
|
|
|
return [
|
|
[8, '1-Jan-2007', '10-Jan-2007'],
|
|
[3, '18-Jun-2008', '20-Jun-2008'],
|
|
[5, '16-Jun-2008', '20-Jun-2008'],
|
|
[5, '14-Jun-2008', '20-Jun-2008'],
|
|
[1, '20-Jun-2008', '20-Jun-2008'],
|
|
[0, '21-Jun-2008', '21-Jun-2008'],
|
|
[0, '20-Jun-2008', '20-Jun-2008', ['20-Jun-2008']],
|
|
[0, '20-Jun-2008', '20-Jun-2008', ['20-Jun-2008', '20-Jun-2008']],
|
|
[8, '14-Jun-2008', '25-Jun-2008'],
|
|
[17, '19-Dec-1960', '10-Jan-1961'],
|
|
[-17, '10-Jan-1961', '19-Dec-1960'],
|
|
[16, '19-Dec-1960', '10-Jan-1961', ['25-Dec-1960', '26-Dec-1960', '01-Jan-1961']],
|
|
[-16, '10-Jan-1961', '19-Dec-1960', ['25-Dec-1960', '26-Dec-1960', '01-Jan-1961']],
|
|
[65, '1-Jan-2007', '31-Mar-2007'],
|
|
[23, '1-Jan-2007', '31-Jan-2007'],
|
|
[24, '1-Jan-2007', '1-Feb-2007'],
|
|
[43, '1-Jan-2007', '28-Feb-2007'],
|
|
[2, '31-Jan-2007', '1-Feb-2007'],
|
|
[ExcelError::VALUE(), 'ABQZ', '1-Feb-2007'],
|
|
[ExcelError::VALUE(), '1-Feb-2007', 'ABQZ'],
|
|
[10, '2021-02-13', '2021-02-27'],
|
|
[10, '2021-02-14', '2021-02-27'],
|
|
[3, '2021-02-14', '2021-02-17'],
|
|
[8, '2021-02-14', '2021-02-24'],
|
|
[9, '2021-02-14', '2021-02-25'],
|
|
[10, '2021-02-14', '2021-02-26'],
|
|
[9, '2021-02-13', '2021-02-25'],
|
|
[10, '2021-02-12', '2021-02-25'],
|
|
[ExcelError::VALUE(), '10-Jan-1961', '19-Dec-1960', ['25-Dec-1960', 'ABQZ', '01-Jan-1961']],
|
|
];
|