ILIAS  release_8 Revision v8.25-1-g13de6a5eca6
ilMathTest.php
Go to the documentation of this file.
1<?php
2
19use PHPUnit\Framework\TestCase;
20
24class ilMathTest extends TestCase
25{
27
31 protected function setUp(): void
32 {
33 $this->eval_math = new EvalMath();
34 }
35
39 public function testGcd(string $a, string $b, string $result): void
40 {
41 $this->assertEquals($result, ilMath::getGreatestCommonDivisor($a, $b));
42 }
43
47 public function gcdData(): array
48 {
49 return [
50 ['1254', '5298', '6'],
51 ['41414124', '41414124', '41414124']
52 ];
53 }
54}
EvalMath $eval_math
Definition: ilMathTest.php:26
testGcd(string $a, string $b, string $result)
@dataProvider gcdData
Definition: ilMathTest.php:39
setUp()
@inheritDoc
Definition: ilMathTest.php:31
static getGreatestCommonDivisor($a, $b)
$a
thx to https://mlocati.github.io/php-cs-fixer-configurator for the examples