ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilMathTest.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2016 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
9 {
13  protected $eval_math;
14 
18  protected function setUp()
19  {
20  require_once 'Services/Math/classes/class.ilMath.php';
21  require_once 'Services/Math/classes/class.EvalMath.php';
22  $this->eval_math = new EvalMath();
23  }
24 
28  public function testGcd($a, $b, $result)
29  {
30  $this->assertEquals($result, ilMath::getGreatestCommonDivisor($a, $b));
31  }
32 
36  public function gcdData()
37  {
38  return [
39  ['1254', '5298', '6'],
40  ['41414124', '41414124', '41414124']
41  ];
42  }
43 }
$result
testGcd($a, $b, $result)
gcdData
Definition: ilMathTest.php:28
static getGreatestCommonDivisor($a, $b)