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 for assErrorTextTest
- Author
- Maximilian Becker mbeck.nosp@m.er@d.nosp@m.ataba.nosp@m.y.de
Definition at line 26 of file assErrorTextTest.php.
◆ setUp()
| assErrorTextTest::setUp |
( |
| ) |
|
|
protected |
◆ test_getErrorsFromText()
| assErrorTextTest::test_getErrorsFromText |
( |
| ) |
|
Definition at line 65 of file assErrorTextTest.php.
68 $instance->setPointsWrong(-2);
71 Eine Kündigung kommt durch zwei ((gleichlautende Willenserklärungen zustande)). 72 Ein Vertrag kommt durch ((drei gleichlaute)) Willenserklärungen zustande. 73 Ein Kaufvertrag an der Kasse im #Supermarkt kommt durch das legen von Ware auf das 74 Kassierband und den Kassiervorgang zustande. Dies nennt man ((konsequentes Handeln.))';
83 $instance->setErrorText($errortext);
84 $instance->parseErrorText();
85 $instance->setErrorsFromParsedErrorText();
86 $actual = $instance->getErrorData();
88 $this->assertEquals($expected, $actual);
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
◆ test_getErrorsFromText_noMatch()
| assErrorTextTest::test_getErrorsFromText_noMatch |
( |
| ) |
|
Definition at line 91 of file assErrorTextTest.php.
94 $instance->setPointsWrong(-2);
97 Eine Kündigung)) kommt durch zwei gleichlautende (Willenserklärungen) zustande. 98 Ein Vertrag kommt durch (drei gleichlaute) Willenserklärungen zustande. 99 Ein Kaufvertrag an der Kasse im Supermarkt [kommt] durch das legen von Ware auf das 100 Kassierband und den [[Kassiervorgang]] zustande. Dies nennt man *konsequentes Handeln.';
104 $instance->setErrorText($errortext);
105 $instance->parseErrorText();
106 $instance->setErrorsFromParsedErrorText();
107 $actual = $instance->getErrorData();
109 $this->assertEquals($expected, $actual);
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
◆ test_instantiateObjectSimple()
| assErrorTextTest::test_instantiateObjectSimple |
( |
| ) |
|
Definition at line 53 of file assErrorTextTest.php.
56 require_once
'./Modules/TestQuestionPool/classes/class.assErrorText.php';
62 $this->assertInstanceOf(
'assErrorText', $instance);
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
◆ test_removeErrorDataWithoutPosition()
| assErrorTextTest::test_removeErrorDataWithoutPosition |
( |
| ) |
|
Definition at line 150 of file assErrorTextTest.php.
153 $instance->setPointsWrong(-2);
155 $parsed_errortext = [
157 [
'text' =>
'1',
'error_type' =>
'none'],
159 'text' =>
'gleichlautende',
160 'text_wrong' =>
'gleichlautende Willenserklärungen zustande.',
161 'error_type' =>
'passage_start',
162 'error_position' => 1,
163 'text_correct' =>
'',
166 [
'text' =>
'2',
'error_type' =>
'none'],
168 'text' =>
'Supermarkt',
169 'text_wrong' =>
'Supermarkt',
170 'error_type' =>
'word',
171 'error_position' => 3,
172 'text_correct' =>
'',
189 $instance->setParsedErrorText($parsed_errortext);
190 $instance->setErrorData($errordata);
191 $instance->removeErrorDataWithoutPosition();
192 $actual = $instance->getErrorData();
194 $this->assertEquals($expected, $actual);
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
◆ test_setErrordata()
| assErrorTextTest::test_setErrordata |
( |
| ) |
|
Definition at line 112 of file assErrorTextTest.php.
115 $instance->setPointsWrong(-2);
119 $instance->setErrorData($errordata);
120 $actual = $instance->getErrorData();
122 $this->assertEquals($expected, $actual);
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
◆ test_setErrordata_oldErrordataPresent()
| assErrorTextTest::test_setErrordata_oldErrordataPresent |
( |
| ) |
|
Definition at line 125 of file assErrorTextTest.php.
128 $instance->setPointsWrong(-2);
143 $instance->setErrorData($old_errordata);
144 $instance->setErrorData($new_errordata);
146 $actual = $instance->getErrorData();
148 $this->assertEquals($new_errordata, $actual);
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
◆ $backupGlobals
| assErrorTextTest::$backupGlobals = false |
|
protected |
The documentation for this class was generated from the following file: