19 if (defined(
'ILIAS_PHPUNIT_CONTEXT'))
21 include_once(
"./Services/PHPUnit/classes/class.ilUnitUtil.php");
22 ilUnitUtil::performInitialisation();
26 chdir( dirname( __FILE__ ) );
30 include_once
'./Modules/Test/classes/class.assMarkSchema.php';
40 $expected = is_array(array());
43 $actual = is_array($this->ass_mark_schema->mark_steps);
49 "Constructor failed, mark_steps not an array." 62 $txt_failed_short =
"failed";
63 $txt_failed_official =
"failed";
64 $percentage_failed = 0;
66 $txt_passed_short =
"passed";
67 $txt_passed_official =
"passed";
68 $percentage_passed = 50;
72 $this->ass_mark_schema->createSimpleSchema();
73 $marks = $this->ass_mark_schema->mark_steps;
82 'Failed on $txt_failed_short' 87 'Failed on $txt_failed_official' 92 'Failed on $percentage_failed' 97 'Failed on $failed_passed' 101 $passed->getShortName(),
103 'Failed on $txt_passed_short' 106 $passed->getOfficialName(),
107 $txt_passed_official,
108 'Failed on $txt_passed_official' 111 $passed->getMinimumLevel(),
113 'Failed on $percetage_passed' 116 $passed->getPassed(),
118 'Failed on $passed_passed' 129 $txt_failed_short =
"failed";
130 $txt_failed_official =
"failed";
131 $percentage_failed = 0;
133 $txt_passed_short =
"passed";
134 $txt_passed_official =
"passed";
135 $percentage_passed = 50;
139 $this->ass_mark_schema->createSimpleSchema(
141 $txt_failed_official,
145 $txt_passed_official,
150 $marks = $this->ass_mark_schema->mark_steps;
159 'Failed on $txt_failed_short' 163 $txt_failed_official,
164 'Failed on $txt_failed_official' 169 'Failed on $percentage_failed' 174 'Failed on $failed_passed' 178 $passed->getShortName(),
180 'Failed on $txt_passed_short' 183 $passed->getOfficialName(),
184 $txt_passed_official,
185 'Failed on $txt_passed_official' 188 $passed->getMinimumLevel(),
190 'Failed on $percetage_passed' 193 $passed->getPassed(),
195 'Failed on $passed_passed' 205 $expected = is_array(array());
206 $this->ass_mark_schema->mark_steps =
"a string";
207 $this->assertEquals($this->ass_mark_schema->mark_steps,
"a string");
208 $this->ass_mark_schema->flush();
211 $actual = is_array($this->ass_mark_schema->mark_steps);
217 "Method failed, mark_steps not an array." 228 $this->ass_mark_schema->flush();
235 $this->ass_mark_schema->addMarkStep();
236 $mark_schema = $this->ass_mark_schema->mark_steps;
237 $mark_step = $mark_schema[0];
241 $mark_step->getShortName(),
243 'Failed on $txt_failed_short' 246 $mark_step->getOfficialName(),
248 'Failed on $txt_failed_official' 251 $mark_step->getMinimumLevel(),
253 'Failed on $percentage_failed' 256 $mark_step->getPassed(),
258 '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()