|
ILIAS
release_8 Revision v8.24
|
Inheritance diagram for ilMathBaseAdapterTest:
Collaboration diagram for ilMathBaseAdapterTest:Public Member Functions | |
| testAdd (string $a, string $b, string $result, int $scale) | |
| @dataProvider addData More... | |
| testSub (string $a, string $b, string $result, int $scale) | |
| @dataProvider subData More... | |
| testMul (string $a, string $b, string $result, int $scale) | |
| @dataProvider mulData More... | |
| testDiv (string $a, string $b, string $result, int $scale) | |
| @dataProvider divData More... | |
| testSqrt (string $a, string $result, ?int $scale) | |
| @dataProvider sqrtData More... | |
| testPow (string $a, string $b, string $result, ?int $scale) | |
| @dataProvider powData More... | |
| testMod (string $a, string $b, string $result) | |
| @dataProvider modData More... | |
| testEquals (string $a, string $b, bool $result, ?int $scale) | |
| @dataProvider equalsData More... | |
| testCalculation (string $formula, string $result, int $scale) | |
| @dataProvider calcData More... | |
| testDivisionsByZero () | |
| testModuloByZero () | |
| addData () | |
| subData () | |
| mulData () | |
| divData () | |
| modData () | |
| sqrtData () | |
| powData () | |
| equalsData () | |
| calcData () | |
Protected Member Functions | |
| setUp () | |
| @inheritDoc More... | |
Protected Attributes | |
| const | DEFAULT_SCALE = 50 |
| ilMathAdapter | $mathAdapter |
| EvalMath | $evalMath |
Private Member Functions | |
| assertEqualNumbers (string $actual, string $expected) | |
| This method is used as a 'Comparator' for two numeric strings and is equal to the ScalarComparator behaviour of PHPUnit 5.x In PHPUnit 8 the ScalarComparators uses a strict string comparison, so numbers with a different amount of trailing 0 decimals are not equal anymore. More... | |
Definition at line 26 of file ilMathBaseAdapterTest.php.
| ilMathBaseAdapterTest::addData | ( | ) |
Definition at line 155 of file ilMathBaseAdapterTest.php.
References DEFAULT_SCALE.
|
private |
This method is used as a 'Comparator' for two numeric strings and is equal to the ScalarComparator behaviour of PHPUnit 5.x In PHPUnit 8 the ScalarComparators uses a strict string comparison, so numbers with a different amount of trailing 0 decimals are not equal anymore.
| string | $actual | |
| string | $expected |
@noinspection PhpUnitTestsInspection
Definition at line 51 of file ilMathBaseAdapterTest.php.
Referenced by testAdd(), testCalculation(), testDiv(), testEquals(), testMod(), testMul(), testPow(), testSqrt(), and testSub().
Here is the caller graph for this function:| ilMathBaseAdapterTest::calcData | ( | ) |
Definition at line 243 of file ilMathBaseAdapterTest.php.
References DEFAULT_SCALE.
| ilMathBaseAdapterTest::divData | ( | ) |
Definition at line 187 of file ilMathBaseAdapterTest.php.
References DEFAULT_SCALE.
| ilMathBaseAdapterTest::equalsData | ( | ) |
Definition at line 232 of file ilMathBaseAdapterTest.php.
| ilMathBaseAdapterTest::modData | ( | ) |
Definition at line 199 of file ilMathBaseAdapterTest.php.
| ilMathBaseAdapterTest::mulData | ( | ) |
Definition at line 175 of file ilMathBaseAdapterTest.php.
References DEFAULT_SCALE.
| ilMathBaseAdapterTest::powData | ( | ) |
Reimplemented in ilMathBCAdapterTest.
Definition at line 222 of file ilMathBaseAdapterTest.php.
References DEFAULT_SCALE.
|
protected |
@inheritDoc
Reimplemented in ilMathBCAdapterTest, and ilMathPhpAdapterTest.
Definition at line 36 of file ilMathBaseAdapterTest.php.
References ilMath\setDefaultAdapter().
Here is the call graph for this function:| ilMathBaseAdapterTest::sqrtData | ( | ) |
Definition at line 209 of file ilMathBaseAdapterTest.php.
References DEFAULT_SCALE.
| ilMathBaseAdapterTest::subData | ( | ) |
| ilMathBaseAdapterTest::testAdd | ( | string | $a, |
| string | $b, | ||
| string | $result, | ||
| int | $scale | ||
| ) |
@dataProvider addData
Definition at line 62 of file ilMathBaseAdapterTest.php.
References Vendor\Package\$a, Vendor\Package\$b, and assertEqualNumbers().
Here is the call graph for this function:| ilMathBaseAdapterTest::testCalculation | ( | string | $formula, |
| string | $result, | ||
| int | $scale | ||
| ) |
@dataProvider calcData
Definition at line 127 of file ilMathBaseAdapterTest.php.
References assertEqualNumbers().
Here is the call graph for this function:| ilMathBaseAdapterTest::testDiv | ( | string | $a, |
| string | $b, | ||
| string | $result, | ||
| int | $scale | ||
| ) |
@dataProvider divData
Definition at line 86 of file ilMathBaseAdapterTest.php.
References Vendor\Package\$a, Vendor\Package\$b, and assertEqualNumbers().
Here is the call graph for this function:| ilMathBaseAdapterTest::testDivisionsByZero | ( | ) |
Definition at line 135 of file ilMathBaseAdapterTest.php.
| ilMathBaseAdapterTest::testEquals | ( | string | $a, |
| string | $b, | ||
| bool | $result, | ||
| ?int | $scale | ||
| ) |
@dataProvider equalsData
Definition at line 119 of file ilMathBaseAdapterTest.php.
References Vendor\Package\$a, Vendor\Package\$b, and assertEqualNumbers().
Here is the call graph for this function:| ilMathBaseAdapterTest::testMod | ( | string | $a, |
| string | $b, | ||
| string | $result | ||
| ) |
@dataProvider modData
| ilMathDivisionByZeroException |
Definition at line 111 of file ilMathBaseAdapterTest.php.
References Vendor\Package\$a, Vendor\Package\$b, and assertEqualNumbers().
Here is the call graph for this function:| ilMathBaseAdapterTest::testModuloByZero | ( | ) |
Definition at line 145 of file ilMathBaseAdapterTest.php.
| ilMathBaseAdapterTest::testMul | ( | string | $a, |
| string | $b, | ||
| string | $result, | ||
| int | $scale | ||
| ) |
@dataProvider mulData
Definition at line 78 of file ilMathBaseAdapterTest.php.
References Vendor\Package\$a, Vendor\Package\$b, and assertEqualNumbers().
Here is the call graph for this function:| ilMathBaseAdapterTest::testPow | ( | string | $a, |
| string | $b, | ||
| string | $result, | ||
| ?int | $scale | ||
| ) |
@dataProvider powData
Definition at line 102 of file ilMathBaseAdapterTest.php.
References Vendor\Package\$a, Vendor\Package\$b, and assertEqualNumbers().
Here is the call graph for this function:| ilMathBaseAdapterTest::testSqrt | ( | string | $a, |
| string | $result, | ||
| ?int | $scale | ||
| ) |
@dataProvider sqrtData
Definition at line 94 of file ilMathBaseAdapterTest.php.
References Vendor\Package\$a, and assertEqualNumbers().
Here is the call graph for this function:| ilMathBaseAdapterTest::testSub | ( | string | $a, |
| string | $b, | ||
| string | $result, | ||
| int | $scale | ||
| ) |
@dataProvider subData
Definition at line 70 of file ilMathBaseAdapterTest.php.
References Vendor\Package\$a, Vendor\Package\$b, and assertEqualNumbers().
Here is the call graph for this function:
|
protected |
Definition at line 31 of file ilMathBaseAdapterTest.php.
|
protected |
Definition at line 30 of file ilMathBaseAdapterTest.php.
|
protected |
Definition at line 28 of file ilMathBaseAdapterTest.php.
Referenced by addData(), calcData(), divData(), mulData(), powData(), sqrtData(), and subData().