Unit tests for single choice questions.
More...
Unit tests for single choice questions.
- Author
- Maximilian Becker mbeck.nosp@m.er@d.nosp@m.ataba.nosp@m.y.de
- Version
- $Id$
Definition at line 27 of file ilassMarkSchemaTest.php.
◆ setUp()
ilassMarkSchemaTest::setUp |
( |
| ) |
|
|
protected |
Definition at line 32 of file ilassMarkSchemaTest.php.
34 chdir(dirname(__FILE__));
38 include_once
'./Modules/Test/classes/class.assMarkSchema.php';
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
◆ testAddMarkStep()
ilassMarkSchemaTest::testAddMarkStep |
( |
| ) |
|
Test for addMarkStep()
Definition at line 229 of file ilassMarkSchemaTest.php.
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'
◆ testConstructor()
ilassMarkSchemaTest::testConstructor |
( |
| ) |
|
Test constructor.
Definition at line 45 of file ilassMarkSchemaTest.php.
48 $expected = is_array(array());
51 $actual = is_array($this->ass_mark_schema->mark_steps);
57 "Constructor failed, mark_steps not an array."
◆ testCreateSimpleSchemaCustom()
ilassMarkSchemaTest::testCreateSimpleSchemaCustom |
( |
| ) |
|
Test for createSimpleSchema using custom values.
Definition at line 131 of file ilassMarkSchemaTest.php.
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'
◆ testCreateSimpleSchemaDefaults()
ilassMarkSchemaTest::testCreateSimpleSchemaDefaults |
( |
| ) |
|
Test for createSimpleSchema using defaults.
Definition at line 64 of file ilassMarkSchemaTest.php.
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'
◆ testFlush()
ilassMarkSchemaTest::testFlush |
( |
| ) |
|
Test for flush()
Definition at line 207 of file ilassMarkSchemaTest.php.
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."
◆ testSaveToDb_regular()
ilassMarkSchemaTest::testSaveToDb_regular |
( |
| ) |
|
◆ $ass_mark_schema
◆ $backupGlobals
ilassMarkSchemaTest::$backupGlobals = false |
|
protected |
The documentation for this class was generated from the following file: