Files
PhpSpreadsheet/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/VarTest.php
T
Mark Baker 2eaf9b53aa Start splitting some of the basic Statistical functions out into separate classes (#1888)
* Start splitting some of the basic Statistical functions out into separate classes containing just a few similar functions

* Splitting some of the basic Statistical functions out into separate classes containing just a few similar functions - MAX(), MAXA(), MIN() and MINA()

* Splitting some more of the basic Statistical functions out into separate classes containing just a few similar functions - StandardDeviations and Variances
2021-03-02 09:07:28 +01:00

27 lines
632 B
PHP

<?php
namespace PhpOffice\PhpSpreadsheetTests\Calculation\Functions\Statistical;
use PhpOffice\PhpSpreadsheet\Calculation\Statistical;
use PHPUnit\Framework\TestCase;
class VarTest extends TestCase
{
/**
* @dataProvider providerVAR
*
* @param mixed $expectedResult
* @param mixed $values
*/
public function testVAR($expectedResult, $values): void
{
$result = Statistical::VARFunc($values);
self::assertEqualsWithDelta($expectedResult, $result, 1E-12);
}
public function providerVAR()
{
return require 'tests/data/Calculation/Statistical/VAR.php';
}
}