Unit tests.
More...
◆ setUp()
assAnswerTrueFalseTest::setUp |
( |
| ) |
|
|
protected |
Definition at line 15 of file assAnswerTrueFalseTest.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_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 |
( |
| ) |
|
: Fix bug! getCorrectness returns int instead of bool.
Definition at line 85 of file assAnswerTrueFalseTest.php.
87 $this->markTestIncomplete(
'Bug detected, fix not applied yet due to poor coverage.');
90 require_once
'./Modules/TestQuestionPool/classes/class.assAnswerTrueFalse.php';
95 $instance->setFalse();
96 $actual = $instance->getCorrectness();
99 $this->assertEquals($expected, $actual);
Class for true/false or yes/no answers.
◆ test_setFalseIsFalse_shouldReturnUnchangedState()
assAnswerTrueFalseTest::test_setFalseIsFalse_shouldReturnUnchangedState |
( |
| ) |
|
Definition at line 117 of file assAnswerTrueFalseTest.php.
120 require_once
'./Modules/TestQuestionPool/classes/class.assAnswerTrueFalse.php';
125 $instance->setFalse();
126 $actual = $instance->isFalse();
129 $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 102 of file assAnswerTrueFalseTest.php.
105 require_once
'./Modules/TestQuestionPool/classes/class.assAnswerTrueFalse.php';
110 $instance->setTrue();
111 $actual = $instance->isTrue();
114 $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: