mirror of
https://github.com/PHPOffice/PhpSpreadsheet.git
synced 2026-10-03 18:39:14 +00:00
Use calculateFormula Rather Than _calculateFormulaValue in Tests
They aren't quite interchangeable. Both are used in the test suite, with no indication of why one or the other. I think we'd be best off being consistent. Based on the names, I think `_calculateFormulaValue` was intended as a private, or at least internal, method, so favor `calculateFormula`. I do not intend to rename or re-categorize `_calculateFormulaValue`, just remove its usage when it isn't clearly warranted.
This commit is contained in:
@@ -42,8 +42,8 @@ class TextJoinTest extends AllSetupTeardown
|
||||
$calculation = Calculation::getInstance();
|
||||
|
||||
$formula = "=TEXTJOIN({$delimiter}, {$blanks}, {$texts})";
|
||||
$result = $calculation->_calculateFormulaValue($formula);
|
||||
self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);
|
||||
$result = $calculation->calculateFormula($formula);
|
||||
self::assertSame($expectedResult, $result);
|
||||
}
|
||||
|
||||
public static function providerTextjoinArray(): array
|
||||
|
||||
Reference in New Issue
Block a user