This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.
More...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.
ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.
If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Unit tests
- Author
- Maximilian Becker mbeck.nosp@m.er@d.nosp@m.ataba.nosp@m.y.de
Definition at line 26 of file assClozeTestTest.php.
◆ setUp()
assClozeTestTest::setUp |
( |
| ) |
|
|
protected |
◆ test_cleanQuestionText_shouldReturnCleanedText()
assClozeTestTest::test_cleanQuestionText_shouldReturnCleanedText |
( |
| ) |
|
Definition at line 64 of file assClozeTestTest.php.
67 require_once
'./Modules/TestQuestionPool/classes/class.assClozeTest.php';
69 $in_text =
'Ein <gap>Männlein</gap> steht <gap id="Walter">im</gap> <b>Walde</b> ganz <gap 2>still</gap> und [gap]stumm[/gap]<hr />';
70 $expected =
'Ein [gap]Männlein[/gap] steht [gap]im[/gap] <b>Walde</b> ganz [gap]still[/gap] und [gap]stumm[/gap]<hr />';
72 $actual = $instance->cleanQuestiontext($in_text);
74 $this->assertEquals($expected, $actual);
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
◆ test_getAdditionalTableName_shouldReturnAdditionalTableName()
assClozeTestTest::test_getAdditionalTableName_shouldReturnAdditionalTableName |
( |
| ) |
|
Definition at line 176 of file assClozeTestTest.php.
179 require_once
'./Modules/TestQuestionPool/classes/class.assClozeTest.php';
181 $expected =
'qpl_qst_cloze';
183 $actual = $instance->getAdditionalTableName();
185 $this->assertEquals($expected, $actual);
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
◆ test_getAnswerTableName_shouldReturnAnswerTableName()
assClozeTestTest::test_getAnswerTableName_shouldReturnAnswerTableName |
( |
| ) |
|
Definition at line 188 of file assClozeTestTest.php.
191 require_once
'./Modules/TestQuestionPool/classes/class.assClozeTest.php';
193 $expected = array(
"qpl_a_cloze",
'qpl_a_cloze_combi_res');
195 $actual = $instance->getAnswerTableName();
197 $this->assertEquals($expected, $actual);
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
◆ test_getQuestionType_shouldReturnQuestionType()
assClozeTestTest::test_getQuestionType_shouldReturnQuestionType |
( |
| ) |
|
Definition at line 151 of file assClozeTestTest.php.
154 require_once
'./Modules/TestQuestionPool/classes/class.assClozeTest.php';
156 $expected =
'assClozeTest';
158 $actual = $instance->getQuestionType();
160 $this->assertEquals($expected, $actual);
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
◆ test_instantiateObject_shouldReturnInstance()
assClozeTestTest::test_instantiateObject_shouldReturnInstance |
( |
| ) |
|
Definition at line 53 of file assClozeTestTest.php.
56 require_once
'./Modules/TestQuestionPool/classes/class.assClozeTest.php';
61 $this->assertInstanceOf(
'assClozeTest', $instance);
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
◆ test_isComplete_shouldReturnFalseIfIncomplete()
assClozeTestTest::test_isComplete_shouldReturnFalseIfIncomplete |
( |
| ) |
|
Definition at line 77 of file assClozeTestTest.php.
80 require_once
'./Modules/TestQuestionPool/classes/class.assClozeTest.php';
84 $actual = $instance->isComplete();
86 $this->assertEquals($expected, $actual);
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
◆ test_setGetEndTag_defaultShoulBeApplied()
assClozeTestTest::test_setGetEndTag_defaultShoulBeApplied |
( |
| ) |
|
Definition at line 133 of file assClozeTestTest.php.
136 require_once
'./Modules/TestQuestionPool/classes/class.assClozeTest.php';
138 $alternate_tag =
'</gappo_the_great>';
139 $expected =
'[/gap]';
141 $instance->setEndTag($alternate_tag);
142 $intermediate = $instance->getEndTag();
143 $this->assertEquals($alternate_tag, $intermediate);
145 $instance->setEndTag();
146 $actual = $instance->getEndTag();
148 $this->assertEquals($expected, $actual);
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
◆ test_setGetEndTag_shouldReturnValueUnchanged()
assClozeTestTest::test_setGetEndTag_shouldReturnValueUnchanged |
( |
| ) |
|
Definition at line 120 of file assClozeTestTest.php.
123 require_once
'./Modules/TestQuestionPool/classes/class.assClozeTest.php';
125 $expected =
'</gappo_the_great>';
127 $instance->setEndTag($expected);
128 $actual = $instance->getEndTag();
130 $this->assertEquals($expected, $actual);
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
◆ test_setGetFixedTextLength_shouldReturnValueUnchanged()
assClozeTestTest::test_setGetFixedTextLength_shouldReturnValueUnchanged |
( |
| ) |
|
Definition at line 200 of file assClozeTestTest.php.
203 require_once
'./Modules/TestQuestionPool/classes/class.assClozeTest.php';
207 $instance->setFixedTextLength($expected);
208 $actual = $instance->getFixedTextLength();
210 $this->assertEquals($expected, $actual);
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
◆ test_setGetIdenticalScoring_shouldReturnValueUnchanged()
assClozeTestTest::test_setGetIdenticalScoring_shouldReturnValueUnchanged |
( |
| ) |
|
Definition at line 163 of file assClozeTestTest.php.
166 require_once
'./Modules/TestQuestionPool/classes/class.assClozeTest.php';
170 $instance->setIdenticalScoring(
true);
171 $actual = $instance->getIdenticalScoring();
173 $this->assertEquals($expected, $actual);
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
◆ test_setGetStartTag_defaultShoulBeApplied()
assClozeTestTest::test_setGetStartTag_defaultShoulBeApplied |
( |
| ) |
|
Definition at line 102 of file assClozeTestTest.php.
105 require_once
'./Modules/TestQuestionPool/classes/class.assClozeTest.php';
107 $alternate_tag =
'<gappo_the_great>';
110 $instance->setStartTag($alternate_tag);
111 $intermediate = $instance->getStartTag();
112 $this->assertEquals($alternate_tag, $intermediate);
114 $instance->setStartTag();
115 $actual = $instance->getStartTag();
117 $this->assertEquals($expected, $actual);
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
◆ test_setGetStartTag_shouldReturnValueUnchanged()
assClozeTestTest::test_setGetStartTag_shouldReturnValueUnchanged |
( |
| ) |
|
Definition at line 89 of file assClozeTestTest.php.
92 require_once
'./Modules/TestQuestionPool/classes/class.assClozeTest.php';
94 $expected =
'<gappo_the_great>';
96 $instance->setStartTag($expected);
97 $actual = $instance->getStartTag();
99 $this->assertEquals($expected, $actual);
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
◆ $backupGlobals
assClozeTestTest::$backupGlobals = false |
|
protected |
The documentation for this class was generated from the following file: