PhpSpreadsheet/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/SmallTest.php
Mark Baker 9683e5be18
More unit tests for statistical functions, including a bugfix to LARGE() (#1601)
* More unit tests for statistical functions, including a bugfix to LARGE() that was identified in testing
2020-07-29 23:56:37 +02:00

28 lines
692 B
PHP

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