Unit tests.
More...
◆ setUp()
assNumericRangeTest::setUp |
( |
| ) |
|
|
protected |
Definition at line 15 of file assNumericRangeTest.php.
References defined.
17 if (
defined(
'ILIAS_PHPUNIT_CONTEXT')) {
18 include_once(
"./Services/PHPUnit/classes/class.ilUnitUtil.php");
19 ilUnitUtil::performInitialisation();
21 chdir(dirname(__FILE__));
defined( 'APPLICATION_ENV')||define( 'APPLICATION_ENV'
◆ test_contains_shouldReturnFalseIfValueIsHokum()
assNumericRangeTest::test_contains_shouldReturnFalseIfValueIsHokum |
( |
| ) |
|
Definition at line 129 of file assNumericRangeTest.php.
132 require_once
'./Modules/TestQuestionPool/classes/class.assNumericRange.php';
134 $instance->setLowerLimit(1.00);
135 $instance->setUpperLimit(10.00);
139 $actual = $instance->contains(
'Günther');
142 $this->assertEquals($expected, $actual);
Class for numeric ranges of questions.
◆ test_contains_shouldReturnFalseIfValueIsNotContained()
assNumericRangeTest::test_contains_shouldReturnFalseIfValueIsNotContained |
( |
| ) |
|
Definition at line 113 of file assNumericRangeTest.php.
116 require_once
'./Modules/TestQuestionPool/classes/class.assNumericRange.php';
118 $instance->setLowerLimit(1.00);
119 $instance->setUpperLimit(10.00);
123 $actual = $instance->contains(15.00);
126 $this->assertEquals($expected, $actual);
Class for numeric ranges of questions.
◆ test_contains_shouldReturnTrueIfValueIsContained()
assNumericRangeTest::test_contains_shouldReturnTrueIfValueIsContained |
( |
| ) |
|
Definition at line 97 of file assNumericRangeTest.php.
100 require_once
'./Modules/TestQuestionPool/classes/class.assNumericRange.php';
102 $instance->setLowerLimit(1.00);
103 $instance->setUpperLimit(10.00);
107 $actual = $instance->contains(5.00);
110 $this->assertEquals($expected, $actual);
Class for numeric ranges of questions.
◆ test_instantiateObject_shouldReturnInstance()
assNumericRangeTest::test_instantiateObject_shouldReturnInstance |
( |
| ) |
|
Definition at line 26 of file assNumericRangeTest.php.
29 require_once
'./Modules/TestQuestionPool/classes/class.assNumericRange.php';
34 $this->assertInstanceOf(
'assNumericRange', $instance);
Class for numeric ranges of questions.
◆ test_setGetLowerLimit_shouldReturnUnchangedLowerLimit()
assNumericRangeTest::test_setGetLowerLimit_shouldReturnUnchangedLowerLimit |
( |
| ) |
|
Definition at line 37 of file assNumericRangeTest.php.
40 require_once
'./Modules/TestQuestionPool/classes/class.assNumericRange.php';
45 $instance->setLowerLimit($expected);
46 $actual = $instance->getLowerLimit();
49 $this->assertEquals($expected, $actual);
Class for numeric ranges of questions.
◆ test_setGetOrder_shouldReturnUnchangedOrder()
assNumericRangeTest::test_setGetOrder_shouldReturnUnchangedOrder |
( |
| ) |
|
Definition at line 67 of file assNumericRangeTest.php.
70 require_once
'./Modules/TestQuestionPool/classes/class.assNumericRange.php';
75 $instance->setOrder($expected);
76 $actual = $instance->getOrder();
79 $this->assertEquals($expected, $actual);
Class for numeric ranges of questions.
◆ test_setGetUpperLimit_shouldReturnUnchangedUpperLimit()
assNumericRangeTest::test_setGetUpperLimit_shouldReturnUnchangedUpperLimit |
( |
| ) |
|
Definition at line 52 of file assNumericRangeTest.php.
55 require_once
'./Modules/TestQuestionPool/classes/class.assNumericRange.php';
60 $instance->setUpperLimit($expected);
61 $actual = $instance->getUpperLimit();
64 $this->assertEquals($expected, $actual);
Class for numeric ranges of questions.
◆ test_setPoints_shouldReturnUnchangedPoints()
assNumericRangeTest::test_setPoints_shouldReturnUnchangedPoints |
( |
| ) |
|
Definition at line 82 of file assNumericRangeTest.php.
85 require_once
'./Modules/TestQuestionPool/classes/class.assNumericRange.php';
90 $instance->setPoints($expected);
91 $actual = $instance->getPoints();
94 $this->assertEquals($expected, $actual);
Class for numeric ranges of questions.
◆ $backupGlobals
assNumericRangeTest::$backupGlobals = false |
|
protected |
The documentation for this class was generated from the following file: