MaxTest.php 609 B

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