ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
All Data Structures Namespaces Files Functions Variables Modules Pages
ilMathTest Class Reference
+ Inheritance diagram for ilMathTest:
+ Collaboration diagram for ilMathTest:

Public Member Functions

 testGcd ($a, $b, $result)
 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 
)

gcdData

Definition at line 30 of file ilMathTest.php.

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

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