Unit tests.
More...
◆ setUp()
assAnswerTrueFalseTest::setUp |
( |
| ) |
|
|
protected |
Definition at line 15 of file assAnswerTrueFalseTest.php.
17 if (defined(
'ILIAS_PHPUNIT_CONTEXT')) {
18 include_once(
"./Services/PHPUnit/classes/class.ilUnitUtil.php");
19 ilUnitUtil::performInitialisation();
21 chdir(dirname(__FILE__));
◆ test_instantiateObject_shouldReturnInstance()
assAnswerTrueFalseTest::test_instantiateObject_shouldReturnInstance |
( |
| ) |
|
Definition at line 26 of file assAnswerTrueFalseTest.php.
29 require_once
'./Modules/TestQuestionPool/classes/class.assAnswerTrueFalse.php';
34 $this->assertInstanceOf(
'ASS_AnswerTrueFalse', $instance);
Class for true/false or yes/no answers.
◆ test_isFalse_shouldReturnFalseOnTrueState()
assAnswerTrueFalseTest::test_isFalse_shouldReturnFalseOnTrueState |
( |
| ) |
|
Definition at line 67 of file assAnswerTrueFalseTest.php.
70 require_once
'./Modules/TestQuestionPool/classes/class.assAnswerTrueFalse.php';
75 $instance->setCorrectness(
true);
78 $this->assertEquals($expected, $instance->isFalse());
79 $this->assertEquals($expected, $instance->isIncorrect());
Class for true/false or yes/no answers.
◆ test_isTrue_shouldReturnTrue()
assAnswerTrueFalseTest::test_isTrue_shouldReturnTrue |
( |
| ) |
|
Definition at line 52 of file assAnswerTrueFalseTest.php.
55 require_once
'./Modules/TestQuestionPool/classes/class.assAnswerTrueFalse.php';
60 $instance->setCorrectness($expected);
63 $this->assertEquals($expected, $instance->isTrue());
64 $this->assertEquals($expected, $instance->isCorrect());
Class for true/false or yes/no answers.
◆ test_setFalseGetCorrectness_shouldReturnFalse()
assAnswerTrueFalseTest::test_setFalseGetCorrectness_shouldReturnFalse |
( |
| ) |
|
Definition at line 82 of file assAnswerTrueFalseTest.php.
85 require_once
'./Modules/TestQuestionPool/classes/class.assAnswerTrueFalse.php';
90 $instance->setFalse();
91 $actual = $instance->getCorrectness();
94 $this->assertEquals((
bool) $expected, (
bool) $actual);
Class for true/false or yes/no answers.
◆ test_setFalseIsFalse_shouldReturnUnchangedState()
assAnswerTrueFalseTest::test_setFalseIsFalse_shouldReturnUnchangedState |
( |
| ) |
|
Definition at line 112 of file assAnswerTrueFalseTest.php.
115 require_once
'./Modules/TestQuestionPool/classes/class.assAnswerTrueFalse.php';
120 $instance->setFalse();
121 $actual = $instance->isFalse();
124 $this->assertEquals($expected, $actual);
Class for true/false or yes/no answers.
◆ test_setGetCorrectness_shouldReturnUnchangedState()
assAnswerTrueFalseTest::test_setGetCorrectness_shouldReturnUnchangedState |
( |
| ) |
|
Definition at line 37 of file assAnswerTrueFalseTest.php.
40 require_once
'./Modules/TestQuestionPool/classes/class.assAnswerTrueFalse.php';
45 $instance->setCorrectness($expected);
46 $actual = $instance->getCorrectness();
49 $this->assertEquals($expected, $actual);
Class for true/false or yes/no answers.
◆ test_setTrueIsTrue_shouldReturnUnchangedState()
assAnswerTrueFalseTest::test_setTrueIsTrue_shouldReturnUnchangedState |
( |
| ) |
|
Definition at line 97 of file assAnswerTrueFalseTest.php.
100 require_once
'./Modules/TestQuestionPool/classes/class.assAnswerTrueFalse.php';
105 $instance->setTrue();
106 $actual = $instance->isTrue();
109 $this->assertEquals($expected, $actual);
Class for true/false or yes/no answers.
◆ $backupGlobals
assAnswerTrueFalseTest::$backupGlobals = false |
|
protected |
The documentation for this class was generated from the following file: