Unit tests.
More...
◆ setUp()
assAnswerTrueFalseTest::setUp |
( |
| ) |
|
|
protected |
Definition at line 15 of file assAnswerTrueFalseTest.php.
References defined.
17 if (
defined(
'ILIAS_PHPUNIT_CONTEXT'))
19 include_once(
"./Services/PHPUnit/classes/class.ilUnitUtil.php");
20 ilUnitUtil::performInitialisation();
24 chdir( dirname( __FILE__ ) );
defined( 'APPLICATION_ENV')||define( 'APPLICATION_ENV'
◆ test_instantiateObject_shouldReturnInstance()
assAnswerTrueFalseTest::test_instantiateObject_shouldReturnInstance |
( |
| ) |
|
Definition at line 29 of file assAnswerTrueFalseTest.php.
32 require_once
'./Modules/TestQuestionPool/classes/class.assAnswerTrueFalse.php';
37 $this->assertInstanceOf(
'ASS_AnswerTrueFalse', $instance);
Class for true/false or yes/no answers.
◆ test_isFalse_shouldReturnFalseOnTrueState()
assAnswerTrueFalseTest::test_isFalse_shouldReturnFalseOnTrueState |
( |
| ) |
|
Definition at line 70 of file assAnswerTrueFalseTest.php.
73 require_once
'./Modules/TestQuestionPool/classes/class.assAnswerTrueFalse.php';
78 $instance->setCorrectness(
true);
81 $this->assertEquals($expected, $instance->isFalse());
82 $this->assertEquals($expected, $instance->isIncorrect());
Class for true/false or yes/no answers.
◆ test_isTrue_shouldReturnTrue()
assAnswerTrueFalseTest::test_isTrue_shouldReturnTrue |
( |
| ) |
|
Definition at line 55 of file assAnswerTrueFalseTest.php.
58 require_once
'./Modules/TestQuestionPool/classes/class.assAnswerTrueFalse.php';
63 $instance->setCorrectness($expected);
66 $this->assertEquals($expected, $instance->isTrue());
67 $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 88 of file assAnswerTrueFalseTest.php.
90 $this->markTestIncomplete(
'Bug detected, fix not applied yet due to poor coverage.');
93 require_once
'./Modules/TestQuestionPool/classes/class.assAnswerTrueFalse.php';
98 $instance->setFalse();
99 $actual = $instance->getCorrectness();
102 $this->assertEquals($expected, $actual);
Class for true/false or yes/no answers.
◆ test_setFalseIsFalse_shouldReturnUnchangedState()
assAnswerTrueFalseTest::test_setFalseIsFalse_shouldReturnUnchangedState |
( |
| ) |
|
Definition at line 120 of file assAnswerTrueFalseTest.php.
123 require_once
'./Modules/TestQuestionPool/classes/class.assAnswerTrueFalse.php';
128 $instance->setFalse();
129 $actual = $instance->isFalse();
132 $this->assertEquals($expected, $actual);
Class for true/false or yes/no answers.
◆ test_setGetCorrectness_shouldReturnUnchangedState()
assAnswerTrueFalseTest::test_setGetCorrectness_shouldReturnUnchangedState |
( |
| ) |
|
Definition at line 40 of file assAnswerTrueFalseTest.php.
43 require_once
'./Modules/TestQuestionPool/classes/class.assAnswerTrueFalse.php';
48 $instance->setCorrectness($expected);
49 $actual = $instance->getCorrectness();
52 $this->assertEquals($expected, $actual);
Class for true/false or yes/no answers.
◆ test_setTrueIsTrue_shouldReturnUnchangedState()
assAnswerTrueFalseTest::test_setTrueIsTrue_shouldReturnUnchangedState |
( |
| ) |
|
Definition at line 105 of file assAnswerTrueFalseTest.php.
108 require_once
'./Modules/TestQuestionPool/classes/class.assAnswerTrueFalse.php';
113 $instance->setTrue();
114 $actual = $instance->isTrue();
117 $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: