mirror of
https://github.com/PHPOffice/PhpSpreadsheet.git
synced 2026-10-01 17:37:34 +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:
@@ -177,8 +177,8 @@ class LeftTest extends AllSetupTeardown
|
||||
$calculation = Calculation::getInstance();
|
||||
|
||||
$formula = "=LEFT({$argument1}, {$argument2})";
|
||||
$result = $calculation->_calculateFormulaValue($formula);
|
||||
self::assertEqualsWithDelta($expectedResult, $result, 1.0e-14);
|
||||
$result = $calculation->calculateFormula($formula);
|
||||
self::assertSame($expectedResult, $result);
|
||||
}
|
||||
|
||||
public static function providerLeftArray(): array
|
||||
|
||||
Reference in New Issue
Block a user