Clean Up Some Engineering Tests

This came to light while cleaning up ComplexAssert. Many tests are calling `_calculateFormulaValue` rather than `calculateFormula`, and, as a result, have to be trimmed before asserting. This PR changes those calls, and does a bit more to simplify the tests. There are a lot of other non-Engineering tests which call `_calculateFormulaValue`, but none of those need to manipulate the result after the test.

This PR changes only tests, no source code.
This commit is contained in:
oleibman
2025-08-03 13:48:45 -07:00
parent f65b0a2d10
commit 79fca7601c
33 changed files with 377 additions and 689 deletions
@@ -6,14 +6,15 @@ namespace PhpOffice\PhpSpreadsheetTests\Calculation;
use PhpOffice\PhpSpreadsheet\Calculation\Calculation;
use PhpOffice\PhpSpreadsheet\Spreadsheet;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;
class ArrayFormulaTest extends TestCase
{
#[\PHPUnit\Framework\Attributes\DataProvider('providerArrayFormulae')]
#[DataProvider('providerArrayFormulae')]
public function testArrayFormula(string $formula, mixed $expectedResult): void
{
$result = Calculation::getInstance()->_calculateFormulaValue($formula);
$result = Calculation::getInstance()->calculateFormula($formula);
self::assertEquals($expectedResult, $result);
}