ILIAS  release_7 Revision v7.30-3-g800a261c036
ilMathTest Class Reference
+ Inheritance diagram for ilMathTest:
+ Collaboration diagram for ilMathTest:

Public Member Functions

 testGcd ($a, $b, $result)
 @dataProvider gcdData More...
 
 gcdData ()
 

Protected Member Functions

 setUp ()
 

Protected Attributes

 $eval_math
 

Detailed Description

Author
Michael Jansen mjans.nosp@m.en@d.nosp@m.ataba.nosp@m.y.de
Version
$Id$

Definition at line 10 of file ilMathTest.php.

Member Function Documentation

◆ gcdData()

ilMathTest::gcdData ( )
Returns
array

Definition at line 38 of file ilMathTest.php.

39 {
40 return [
41 ['1254', '5298', '6'],
42 ['41414124', '41414124', '41414124']
43 ];
44 }

◆ setUp()

ilMathTest::setUp ( )
protected

Definition at line 20 of file ilMathTest.php.

20 : void
21 {
22 require_once 'Services/Math/classes/class.ilMath.php';
23 require_once 'Services/Math/classes/class.EvalMath.php';
24 $this->eval_math = new EvalMath();
25 }

◆ testGcd()

ilMathTest::testGcd (   $a,
  $b,
  $result 
)

@dataProvider gcdData

Definition at line 30 of file ilMathTest.php.

31 {
32 $this->assertEquals($result, ilMath::getGreatestCommonDivisor($a, $b));
33 }
$result
static getGreatestCommonDivisor($a, $b)
$a
thx to https://mlocati.github.io/php-cs-fixer-configurator for the examples

References Vendor\Package\$a, Vendor\Package\$b, $result, and ilMath\getGreatestCommonDivisor().

+ Here is the call graph for this function:

Field Documentation

◆ $eval_math

ilMathTest::$eval_math
protected

Definition at line 15 of file ilMathTest.php.


The documentation for this class was generated from the following file: