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 60 of file assErrorTextTest.php.
63 $instance->setPointsWrong(-2);
66 Eine Kündigung kommt durch zwei ((gleichlautende Willenserklärungen zustande)). 67 Ein Vertrag kommt durch ((drei gleichlaute)) Willenserklärungen zustande. 68 Ein Kaufvertrag an der Kasse im #Supermarkt kommt durch das legen von Ware auf das 69 Kassierband und den Kassiervorgang zustande. Dies nennt man ((konsequentes Handeln.))';
78 $instance->setErrorText($errortext);
79 $instance->parseErrorText();
80 $instance->setErrorsFromParsedErrorText();
81 $actual = $instance->getErrorData();
83 $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 86 of file assErrorTextTest.php.
89 $instance->setPointsWrong(-2);
92 Eine Kündigung)) kommt durch zwei gleichlautende (Willenserklärungen) zustande. 93 Ein Vertrag kommt durch (drei gleichlaute) Willenserklärungen zustande. 94 Ein Kaufvertrag an der Kasse im Supermarkt [kommt] durch das legen von Ware auf das 95 Kassierband und den [[Kassiervorgang]] zustande. Dies nennt man *konsequentes Handeln.';
99 $instance->setErrorText($errortext);
100 $instance->parseErrorText();
101 $instance->setErrorsFromParsedErrorText();
102 $actual = $instance->getErrorData();
104 $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 51 of file assErrorTextTest.php.
57 $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 145 of file assErrorTextTest.php.
148 $instance->setPointsWrong(-2);
150 $parsed_errortext = [
152 [
'text' =>
'1',
'error_type' =>
'none'],
154 'text' =>
'gleichlautende',
155 'text_wrong' =>
'gleichlautende Willenserklärungen zustande.',
156 'error_type' =>
'passage_start',
157 'error_position' => 1,
158 'text_correct' =>
'',
161 [
'text' =>
'2',
'error_type' =>
'none'],
163 'text' =>
'Supermarkt',
164 'text_wrong' =>
'Supermarkt',
165 'error_type' =>
'word',
166 'error_position' => 3,
167 'text_correct' =>
'',
184 $instance->setParsedErrorText($parsed_errortext);
185 $instance->setErrorData($errordata);
186 $instance->removeErrorDataWithoutPosition();
187 $actual = $instance->getErrorData();
189 $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 107 of file assErrorTextTest.php.
110 $instance->setPointsWrong(-2);
114 $instance->setErrorData($errordata);
115 $actual = $instance->getErrorData();
117 $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 120 of file assErrorTextTest.php.
123 $instance->setPointsWrong(-2);
138 $instance->setErrorData($old_errordata);
139 $instance->setErrorData($new_errordata);
141 $actual = $instance->getErrorData();
143 $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: