ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
◀ ilDoc Overview
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
8
class
ilMathTest
extends
PHPUnit_Framework_TestCase
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
}
ilMathTest\gcdData
gcdData()
Definition:
ilMathTest.php:36
$result
$result
Definition:
CleanUpTest.php:463
PHPUnit_Framework_TestCase
ilMathTest
Definition:
ilMathTest.php:8
ilMathTest\$eval_math
$eval_math
Definition:
ilMathTest.php:13
EvalMath
Definition:
class.EvalMath.php:89
ilMathTest\setUp
setUp()
Definition:
ilMathTest.php:18
ilMathTest\testGcd
testGcd($a, $b, $result)
gcdData
Definition:
ilMathTest.php:28
ilMath\getGreatestCommonDivisor
static getGreatestCommonDivisor($a, $b)
Definition:
class.ilMath.php:119
php
Services
Math
test
ilMathTest.php
Generated on Thu Jan 16 2025 19:02:25 for ILIAS by
1.8.13 (using
Doxyfile
)