39 if (defined(
'ILIAS_PHPUNIT_CONTEXT'))
41 include_once(
"./Services/PHPUnit/classes/class.ilUnitUtil.php");
42 ilUnitUtil::performInitialisation();
46 chdir( dirname( __FILE__ ) );
50 include_once
'./Modules/Test/classes/class.assMarkSchema.php';
60 $expected = is_array(array());
63 $actual = is_array($this->ass_mark_schema->mark_steps);
69 "Constructor failed, mark_steps not an array."
82 $txt_failed_short =
"failed";
83 $txt_failed_official =
"failed";
84 $percentage_failed = 0;
86 $txt_passed_short =
"passed";
87 $txt_passed_official =
"passed";
88 $percentage_passed = 50;
92 $this->ass_mark_schema->createSimpleSchema();
93 $marks = $this->ass_mark_schema->mark_steps;
102 'Failed on $txt_failed_short'
106 $txt_failed_official,
107 'Failed on $txt_failed_official'
112 'Failed on $percentage_failed'
117 'Failed on $failed_passed'
121 $passed->getShortName(),
123 'Failed on $txt_passed_short'
126 $passed->getOfficialName(),
127 $txt_passed_official,
128 'Failed on $txt_passed_official'
131 $passed->getMinimumLevel(),
133 'Failed on $percetage_passed'
136 $passed->getPassed(),
138 'Failed on $passed_passed'
149 $txt_failed_short =
"failed";
150 $txt_failed_official =
"failed";
151 $percentage_failed = 0;
153 $txt_passed_short =
"passed";
154 $txt_passed_official =
"passed";
155 $percentage_passed = 50;
159 $this->ass_mark_schema->createSimpleSchema(
161 $txt_failed_official,
165 $txt_passed_official,
170 $marks = $this->ass_mark_schema->mark_steps;
179 'Failed on $txt_failed_short'
183 $txt_failed_official,
184 'Failed on $txt_failed_official'
189 'Failed on $percentage_failed'
194 'Failed on $failed_passed'
198 $passed->getShortName(),
200 'Failed on $txt_passed_short'
203 $passed->getOfficialName(),
204 $txt_passed_official,
205 'Failed on $txt_passed_official'
208 $passed->getMinimumLevel(),
210 'Failed on $percetage_passed'
213 $passed->getPassed(),
215 'Failed on $passed_passed'
225 $expected = is_array(array());
226 $this->ass_mark_schema->mark_steps =
"a string";
227 $this->assertEquals($this->ass_mark_schema->mark_steps,
"a string");
228 $this->ass_mark_schema->flush();
231 $actual = is_array($this->ass_mark_schema->mark_steps);
237 "Method failed, mark_steps not an array."
248 $this->ass_mark_schema->flush();
255 $this->ass_mark_schema->addMarkStep();
256 $mark_schema = $this->ass_mark_schema->mark_steps;
257 $mark_step = $mark_schema[0];
261 $mark_step->getShortName(),
263 'Failed on $txt_failed_short'
266 $mark_step->getOfficialName(),
268 'Failed on $txt_failed_official'
271 $mark_step->getMinimumLevel(),
273 'Failed on $percentage_failed'
276 $mark_step->getPassed(),
278 'Failed on $failed_passed'