PhpSpreadsheet/tests/PhpSpreadsheetTests/Calculation
oleibman 4001c89aaa
isFormula Referencing Sheet With Space in Title (#2306)
* isFormula Referencing Sheet With Space in Title

See issue #2304. User sets a cell to `ISFORMULA(cell)`, where `cell` exists on a sheet whose title contains a space, and receives an error. Coordinates are not being passed correctly to Functions::isFormula; in particular, the sheet name is not enclosed in apostrophes, e.g. `Sheet Name!A1` rather than `'Sheet Name'!A1`. (Note that sheet name was not specified in Cell; PhpSpreadsheet adds it before calling isFormula.) Sheets without embedded spaces (or other non-word characters) are handled correctly with or without apostrophes, but spaces require surrounding apostrophes.

As part of this investigation, I determined that Excel handles defined names and cell ranges in ISFORMULA (subject to spills), and that PhpSpreadsheet does not. It is changed to handle them. In the absence of spill support, it will use only the first cell in the range.

Existing tests for ISFORMULA used mocking unneccesarily. They are moved to a separate test member, and mocking is no longer used.

* PhpUnit and Jpgraph

35_Char_render.php had previously been a problem only for PHP8+. It is now a problem for PHP7.4, and will therefore be skipped all the time.
2021-10-03 10:04:48 -07:00
..
Engine Reduce PHPStan error in tests 2021-04-12 11:10:23 +09:00
Functions 2 Tests vs. Scrutinizer/Phpstan 2021-07-01 11:15:02 +02:00
CalculationTest.php Some simplification to the locale file loader 2021-05-20 20:41:09 +02:00
DefinedNameConfusedForCellTest.php Reduce PHPStan error in tests 2021-04-12 11:10:23 +09:00
DefinedNamesCalculationTest.php Named formula implementation, and improved handling of Defined Names generally (#1535) 2020-07-26 12:00:06 +02:00
FormulaAsStringTest.php Reduce PHPStan error in tests 2021-04-12 11:10:23 +09:00
FunctionsTest.php isFormula Referencing Sheet With Space in Title (#2306) 2021-10-03 10:04:48 -07:00
IsFormulaTest.php isFormula Referencing Sheet With Space in Title (#2306) 2021-10-03 10:04:48 -07:00
LookupRefTest.php Completion of refactoring for Excel Lookup and Reference functions (#2030) 2021-04-28 14:08:20 +02:00
MergedCellTest.php Select the correct TestCase 2021-05-31 13:59:51 +02:00
RowColumnReferenceTest.php Improve Range handling in the Calculation Engine for Row and Column ranges (#2028) 2021-04-27 19:10:37 +02:00
TranslationTest.php Reduce PHPStan error in tests 2021-04-12 11:10:23 +09:00
XlfnFunctionsTest.php Reduce PHPStan error in tests 2021-04-12 11:10:23 +09:00