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 13 of file ilassMarkSchemaTest.php.
◆ setUp()
ilassMarkSchemaTest::setUp |
( |
| ) |
|
|
protected |
Definition at line 17 of file ilassMarkSchemaTest.php.
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';
A class defining mark schemas for assessment test objects.
◆ testAddMarkStep()
ilassMarkSchemaTest::testAddMarkStep |
( |
| ) |
|
Test for addMarkStep()
Definition at line 219 of file ilassMarkSchemaTest.php.
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'
◆ testConstructor()
ilassMarkSchemaTest::testConstructor |
( |
| ) |
|
Test constructor.
Definition at line 34 of file ilassMarkSchemaTest.php.
37 $expected = is_array(array());
40 $actual = is_array($this->ass_mark_schema->mark_steps);
46 "Constructor failed, mark_steps not an array."
◆ testCreateSimpleSchemaCustom()
ilassMarkSchemaTest::testCreateSimpleSchemaCustom |
( |
| ) |
|
Test for createSimpleSchema using custom values.
Definition at line 121 of file ilassMarkSchemaTest.php.
References $failed.
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'
◆ testCreateSimpleSchemaDefaults()
ilassMarkSchemaTest::testCreateSimpleSchemaDefaults |
( |
| ) |
|
Test for createSimpleSchema using defaults.
Definition at line 53 of file ilassMarkSchemaTest.php.
References $failed.
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'
◆ testFlush()
ilassMarkSchemaTest::testFlush |
( |
| ) |
|
Test for flush()
Definition at line 197 of file ilassMarkSchemaTest.php.
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."
◆ testSaveToDb_regular()
ilassMarkSchemaTest::testSaveToDb_regular |
( |
| ) |
|
◆ $backupGlobals
ilassMarkSchemaTest::$backupGlobals = false |
|
protected |
The documentation for this class was generated from the following file: