32 protected function setUp(): void
34 chdir(dirname(__FILE__));
38 include_once
'./Modules/Test/classes/class.assMarkSchema.php';
48 $expected = is_array(array());
51 $actual = is_array($this->ass_mark_schema->mark_steps);
57 "Constructor failed, mark_steps not an array." 68 $txt_failed_short =
"failed";
69 $txt_failed_official =
"failed";
70 $percentage_failed = 0;
72 $txt_passed_short =
"passed";
73 $txt_passed_official =
"passed";
74 $percentage_passed = 50;
78 $this->ass_mark_schema->createSimpleSchema();
79 $marks = $this->ass_mark_schema->mark_steps;
86 $failed->getShortName(),
88 'Failed on $txt_failed_short' 91 $failed->getOfficialName(),
93 'Failed on $txt_failed_official' 96 $failed->getMinimumLevel(),
98 'Failed on $percentage_failed' 101 $failed->getPassed(),
103 'Failed on $failed_passed' 107 $passed->getShortName(),
109 'Failed on $txt_passed_short' 112 $passed->getOfficialName(),
113 $txt_passed_official,
114 'Failed on $txt_passed_official' 117 $passed->getMinimumLevel(),
119 'Failed on $percetage_passed' 122 $passed->getPassed(),
124 'Failed on $passed_passed' 134 $txt_failed_short =
"failed";
135 $txt_failed_official =
"failed";
136 $percentage_failed = 0;
138 $txt_passed_short =
"passed";
139 $txt_passed_official =
"passed";
140 $percentage_passed = 50;
144 $this->ass_mark_schema->createSimpleSchema(
146 $txt_failed_official,
150 $txt_passed_official,
155 $marks = $this->ass_mark_schema->mark_steps;
162 $failed->getShortName(),
164 'Failed on $txt_failed_short' 167 $failed->getOfficialName(),
168 $txt_failed_official,
169 'Failed on $txt_failed_official' 172 $failed->getMinimumLevel(),
174 'Failed on $percentage_failed' 177 $failed->getPassed(),
179 'Failed on $failed_passed' 183 $passed->getShortName(),
185 'Failed on $txt_passed_short' 188 $passed->getOfficialName(),
189 $txt_passed_official,
190 'Failed on $txt_passed_official' 193 $passed->getMinimumLevel(),
195 'Failed on $percetage_passed' 198 $passed->getPassed(),
200 'Failed on $passed_passed' 210 $expected = is_array(array());
211 $this->ass_mark_schema->mark_steps = array(
"a string");
212 $this->assertEquals(array(
"a string"), $this->ass_mark_schema->mark_steps);
213 $this->ass_mark_schema->flush();
216 $actual = is_array($this->ass_mark_schema->mark_steps);
222 "Method failed, mark_steps not an array." 232 $this->ass_mark_schema->flush();
239 $this->ass_mark_schema->addMarkStep();
240 $mark_schema = $this->ass_mark_schema->mark_steps;
241 $mark_step = $mark_schema[0];
245 $mark_step->getShortName(),
247 'Failed on $txt_failed_short' 250 $mark_step->getOfficialName(),
252 'Failed on $txt_failed_official' 255 $mark_step->getMinimumLevel(),
257 'Failed on $percentage_failed' 260 $mark_step->getPassed(),
262 'Failed on $failed_passed'
testAddMarkStep()
Test for addMarkStep()
Unit tests for single choice questions.
testCreateSimpleSchemaCustom()
Test for createSimpleSchema using custom values.
testCreateSimpleSchemaDefaults()
Test for createSimpleSchema using defaults.
testConstructor()
Test constructor.
ASS_MarkSchema $ass_mark_schema
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
testFlush()
Test for flush()