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 61 of file assClozeTestTest.php.
64 $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 />';
65 $expected =
'Ein [gap]Männlein[/gap] steht [gap]im[/gap] <b>Walde</b> ganz [gap]still[/gap] und [gap]stumm[/gap]<hr />';
67 $actual = $instance->cleanQuestiontext($in_text);
69 $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 157 of file assClozeTestTest.php.
160 $expected =
'qpl_qst_cloze';
162 $actual = $instance->getAdditionalTableName();
164 $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 167 of file assClozeTestTest.php.
170 $expected = array(
"qpl_a_cloze",
'qpl_a_cloze_combi_res');
172 $actual = $instance->getAnswerTableName();
174 $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 136 of file assClozeTestTest.php.
139 $expected =
'assClozeTest';
141 $actual = $instance->getQuestionType();
143 $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.
58 $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 72 of file assClozeTestTest.php.
77 $actual = $instance->isComplete();
79 $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 120 of file assClozeTestTest.php.
123 $alternate_tag =
'</gappo_the_great>';
124 $expected =
'[/gap]';
126 $instance->setEndTag($alternate_tag);
127 $intermediate = $instance->getEndTag();
128 $this->assertEquals($alternate_tag, $intermediate);
130 $instance->setEndTag();
131 $actual = $instance->getEndTag();
133 $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 109 of file assClozeTestTest.php.
112 $expected =
'</gappo_the_great>';
114 $instance->setEndTag($expected);
115 $actual = $instance->getEndTag();
117 $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 177 of file assClozeTestTest.php.
182 $instance->setFixedTextLength($expected);
183 $actual = $instance->getFixedTextLength();
185 $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 146 of file assClozeTestTest.php.
151 $instance->setIdenticalScoring(
true);
152 $actual = $instance->getIdenticalScoring();
154 $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 93 of file assClozeTestTest.php.
96 $alternate_tag =
'<gappo_the_great>';
99 $instance->setStartTag($alternate_tag);
100 $intermediate = $instance->getStartTag();
101 $this->assertEquals($alternate_tag, $intermediate);
103 $instance->setStartTag();
104 $actual = $instance->getStartTag();
106 $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 82 of file assClozeTestTest.php.
85 $expected =
'<gappo_the_great>';
87 $instance->setStartTag($expected);
88 $actual = $instance->getStartTag();
90 $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: