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 15 of file ilassMarkSchemaTest.php.
◆ setUp()
ilassMarkSchemaTest::setUp |
( |
| ) |
|
|
protected |
Definition at line 19 of file ilassMarkSchemaTest.php.
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';
A class defining mark schemas for assessment test objects.
◆ testAddMarkStep()
ilassMarkSchemaTest::testAddMarkStep |
( |
| ) |
|
Test for addMarkStep()
Definition at line 221 of file ilassMarkSchemaTest.php.
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'
◆ testConstructor()
ilassMarkSchemaTest::testConstructor |
( |
| ) |
|
Test constructor.
Definition at line 36 of file ilassMarkSchemaTest.php.
39 $expected = is_array(array());
42 $actual = is_array($this->ass_mark_schema->mark_steps);
48 "Constructor failed, mark_steps not an array."
◆ testCreateSimpleSchemaCustom()
ilassMarkSchemaTest::testCreateSimpleSchemaCustom |
( |
| ) |
|
Test for createSimpleSchema using custom values.
Definition at line 123 of file ilassMarkSchemaTest.php.
References $failed.
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'
◆ testCreateSimpleSchemaDefaults()
ilassMarkSchemaTest::testCreateSimpleSchemaDefaults |
( |
| ) |
|
Test for createSimpleSchema using defaults.
Definition at line 55 of file ilassMarkSchemaTest.php.
References $failed.
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'
◆ testFlush()
ilassMarkSchemaTest::testFlush |
( |
| ) |
|
Test for flush()
Definition at line 199 of file ilassMarkSchemaTest.php.
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."
◆ testSaveToDb_regular()
ilassMarkSchemaTest::testSaveToDb_regular |
( |
| ) |
|
◆ $backupGlobals
ilassMarkSchemaTest::$backupGlobals = false |
|
protected |
The documentation for this class was generated from the following file: