From fe121e8f7aee43182015defc36900a69eec4eb0c Mon Sep 17 00:00:00 2001 From: Mark Baker Date: Sat, 25 Jul 2020 21:58:08 +0200 Subject: [PATCH] Additional statistical unit tests for non-happy path (#1594) * Additional statistical unit tests for non-happy path --- .../Functions/Statistical/CorrelTest.php | 4 ++- .../Functions/Statistical/KurtTest.php | 25 +++++++++++++++++++ .../data/Calculation/Statistical/BETADIST.php | 8 ++++++ .../data/Calculation/Statistical/BETAINV.php | 8 ++++++ .../Calculation/Statistical/BINOMDIST.php | 12 +++++++++ .../data/Calculation/Statistical/CHIDIST.php | 4 +++ tests/data/Calculation/Statistical/CHIINV.php | 4 +++ .../Calculation/Statistical/CONFIDENCE.php | 12 +++++++++ tests/data/Calculation/Statistical/CORREL.php | 15 +++++++++++ .../Calculation/Statistical/EXPONDIST.php | 8 ++++++ tests/data/Calculation/Statistical/FISHER.php | 8 ++++++ .../Calculation/Statistical/FISHERINV.php | 4 +++ .../Calculation/Statistical/GAMMADIST.php | 8 ++++++ .../data/Calculation/Statistical/GAMMAINV.php | 8 ++++++ .../data/Calculation/Statistical/GAMMALN.php | 8 ++++++ tests/data/Calculation/Statistical/KURT.php | 12 +++++++++ tests/data/Calculation/Statistical/STEYX.php | 10 ++++++++ 17 files changed, 157 insertions(+), 1 deletion(-) create mode 100644 tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/KurtTest.php create mode 100644 tests/data/Calculation/Statistical/KURT.php diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/CorrelTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/CorrelTest.php index 52f773bc..960a4cfd 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/CorrelTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/CorrelTest.php @@ -17,8 +17,10 @@ class CorrelTest extends TestCase * @dataProvider providerCORREL * * @param mixed $expectedResult + * @param mixed $xargs + * @param mixed $yargs */ - public function testCORREL($expectedResult, array $xargs, array $yargs): void + public function testCORREL($expectedResult, $xargs, $yargs): void { $result = Statistical::CORREL($xargs, $yargs); self::assertEqualsWithDelta($expectedResult, $result, 1E-12); diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/KurtTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/KurtTest.php new file mode 100644 index 00000000..b62aa026 --- /dev/null +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/KurtTest.php @@ -0,0 +1,25 @@ +