| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- <?php
- namespace PhpOffice\PhpSpreadsheetTests\Calculation\Functions\Statistical;
- use PhpOffice\PhpSpreadsheet\Calculation\Functions;
- use PhpOffice\PhpSpreadsheet\Calculation\Statistical;
- use PHPUnit\Framework\TestCase;
- class StDevATest extends TestCase
- {
- protected function tearDown(): void
- {
- Functions::setCompatibilityMode(Functions::COMPATIBILITY_EXCEL);
- }
- /**
- * @dataProvider providerSTDEVA
- *
- * @param mixed $expectedResult
- * @param mixed $values
- */
- public function testSTDEVA($expectedResult, $values): void
- {
- $result = Statistical::STDEVA($values);
- self::assertEqualsWithDelta($expectedResult, $result, 1E-12);
- }
- public function providerSTDEVA(): array
- {
- return require 'tests/data/Calculation/Statistical/STDEVA.php';
- }
- /**
- * @dataProvider providerOdsSTDEVA
- *
- * @param mixed $expectedResult
- * @param mixed $values
- */
- public function testOdsSTDEVA($expectedResult, $values): void
- {
- Functions::setCompatibilityMode(Functions::COMPATIBILITY_OPENOFFICE);
- $result = Statistical::STDEVA($values);
- self::assertEqualsWithDelta($expectedResult, $result, 1E-12);
- }
- public function providerOdsSTDEVA(): array
- {
- return require 'tests/data/Calculation/Statistical/STDEVA_ODS.php';
- }
- }
|