SmallTest.php 699 B

123456789101112131415161718192021222324252627
  1. <?php
  2. namespace PhpOffice\PhpSpreadsheetTests\Calculation\Functions\Statistical;
  3. use PhpOffice\PhpSpreadsheet\Calculation\Statistical;
  4. use PHPUnit\Framework\TestCase;
  5. class SmallTest extends TestCase
  6. {
  7. /**
  8. * @dataProvider providerSMALL
  9. *
  10. * @param mixed $expectedResult
  11. * @param mixed $values
  12. * @param mixed $position
  13. */
  14. public function testSMALL($expectedResult, $values, $position): void
  15. {
  16. $result = Statistical::SMALL($values, $position);
  17. self::assertEqualsWithDelta($expectedResult, $result, 1E-12);
  18. }
  19. public function providerSMALL(): array
  20. {
  21. return require 'tests/data/Calculation/Statistical/SMALL.php';
  22. }
  23. }