19 protected function setUp() : void
21 if (defined(
'ILIAS_PHPUNIT_CONTEXT')) {
22 include_once(
"./Services/PHPUnit/classes/class.ilUnitUtil.php");
23 ilUnitUtil::performInitialisation();
25 chdir(dirname(__FILE__));
29 include_once
'./Modules/Test/classes/class.assMarkSchema.php';
39 $expected = is_array(array());
42 $actual = is_array($this->ass_mark_schema->mark_steps);
48 "Constructor failed, mark_steps not an array." 60 $txt_failed_short =
"failed";
61 $txt_failed_official =
"failed";
62 $percentage_failed = 0;
64 $txt_passed_short =
"passed";
65 $txt_passed_official =
"passed";
66 $percentage_passed = 50;
70 $this->ass_mark_schema->createSimpleSchema();
71 $marks = $this->ass_mark_schema->mark_steps;
80 'Failed on $txt_failed_short' 85 'Failed on $txt_failed_official' 90 'Failed on $percentage_failed' 95 'Failed on $failed_passed' 99 $passed->getShortName(),
101 'Failed on $txt_passed_short' 104 $passed->getOfficialName(),
105 $txt_passed_official,
106 'Failed on $txt_passed_official' 109 $passed->getMinimumLevel(),
111 'Failed on $percetage_passed' 114 $passed->getPassed(),
116 'Failed on $passed_passed' 126 $txt_failed_short =
"failed";
127 $txt_failed_official =
"failed";
128 $percentage_failed = 0;
130 $txt_passed_short =
"passed";
131 $txt_passed_official =
"passed";
132 $percentage_passed = 50;
136 $this->ass_mark_schema->createSimpleSchema(
138 $txt_failed_official,
142 $txt_passed_official,
147 $marks = $this->ass_mark_schema->mark_steps;
156 'Failed on $txt_failed_short' 160 $txt_failed_official,
161 'Failed on $txt_failed_official' 166 'Failed on $percentage_failed' 171 'Failed on $failed_passed' 175 $passed->getShortName(),
177 'Failed on $txt_passed_short' 180 $passed->getOfficialName(),
181 $txt_passed_official,
182 'Failed on $txt_passed_official' 185 $passed->getMinimumLevel(),
187 'Failed on $percetage_passed' 190 $passed->getPassed(),
192 'Failed on $passed_passed' 202 $expected = is_array(array());
203 $this->ass_mark_schema->mark_steps =
"a string";
204 $this->assertEquals($this->ass_mark_schema->mark_steps,
"a string");
205 $this->ass_mark_schema->flush();
208 $actual = is_array($this->ass_mark_schema->mark_steps);
214 "Method failed, mark_steps not an array." 224 $this->ass_mark_schema->flush();
231 $this->ass_mark_schema->addMarkStep();
232 $mark_schema = $this->ass_mark_schema->mark_steps;
233 $mark_step = $mark_schema[0];
237 $mark_step->getShortName(),
239 'Failed on $txt_failed_short' 242 $mark_step->getOfficialName(),
244 'Failed on $txt_failed_official' 247 $mark_step->getMinimumLevel(),
249 'Failed on $percentage_failed' 252 $mark_step->getPassed(),
254 '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()