19 if (defined(
'ILIAS_PHPUNIT_CONTEXT')) {
20 include_once(
"./Services/PHPUnit/classes/class.ilUnitUtil.php");
21 ilUnitUtil::performInitialisation();
23 chdir(dirname(__FILE__));
27 include_once
'./Modules/Test/classes/class.assMarkSchema.php';
37 $expected = is_array(array());
40 $actual = is_array($this->ass_mark_schema->mark_steps);
46 "Constructor failed, mark_steps not an array." 58 $txt_failed_short =
"failed";
59 $txt_failed_official =
"failed";
60 $percentage_failed = 0;
62 $txt_passed_short =
"passed";
63 $txt_passed_official =
"passed";
64 $percentage_passed = 50;
68 $this->ass_mark_schema->createSimpleSchema();
69 $marks = $this->ass_mark_schema->mark_steps;
78 'Failed on $txt_failed_short' 83 'Failed on $txt_failed_official' 88 'Failed on $percentage_failed' 93 'Failed on $failed_passed' 97 $passed->getShortName(),
99 'Failed on $txt_passed_short' 102 $passed->getOfficialName(),
103 $txt_passed_official,
104 'Failed on $txt_passed_official' 107 $passed->getMinimumLevel(),
109 'Failed on $percetage_passed' 112 $passed->getPassed(),
114 'Failed on $passed_passed' 124 $txt_failed_short =
"failed";
125 $txt_failed_official =
"failed";
126 $percentage_failed = 0;
128 $txt_passed_short =
"passed";
129 $txt_passed_official =
"passed";
130 $percentage_passed = 50;
134 $this->ass_mark_schema->createSimpleSchema(
136 $txt_failed_official,
140 $txt_passed_official,
145 $marks = $this->ass_mark_schema->mark_steps;
154 'Failed on $txt_failed_short' 158 $txt_failed_official,
159 'Failed on $txt_failed_official' 164 'Failed on $percentage_failed' 169 'Failed on $failed_passed' 173 $passed->getShortName(),
175 'Failed on $txt_passed_short' 178 $passed->getOfficialName(),
179 $txt_passed_official,
180 'Failed on $txt_passed_official' 183 $passed->getMinimumLevel(),
185 'Failed on $percetage_passed' 188 $passed->getPassed(),
190 'Failed on $passed_passed' 200 $expected = is_array(array());
201 $this->ass_mark_schema->mark_steps =
"a string";
202 $this->assertEquals($this->ass_mark_schema->mark_steps,
"a string");
203 $this->ass_mark_schema->flush();
206 $actual = is_array($this->ass_mark_schema->mark_steps);
212 "Method failed, mark_steps not an array." 222 $this->ass_mark_schema->flush();
229 $this->ass_mark_schema->addMarkStep();
230 $mark_schema = $this->ass_mark_schema->mark_steps;
231 $mark_step = $mark_schema[0];
235 $mark_step->getShortName(),
237 'Failed on $txt_failed_short' 240 $mark_step->getOfficialName(),
242 'Failed on $txt_failed_official' 245 $mark_step->getMinimumLevel(),
247 'Failed on $percentage_failed' 250 $mark_step->getPassed(),
252 '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.
A class defining mark schemas for assessment test objects.
testFlush()
Test for flush()