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.
References defined.
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';
A class defining mark schemas for assessment test objects.
defined( 'APPLICATION_ENV')||define( 'APPLICATION_ENV'
◆ testAddMarkStep()
ilassMarkSchemaTest::testAddMarkStep |
( |
| ) |
|
Test for addMarkStep()
Definition at line 225 of file ilassMarkSchemaTest.php.
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'
◆ testConstructor()
ilassMarkSchemaTest::testConstructor |
( |
| ) |
|
Test constructor.
Definition at line 37 of file ilassMarkSchemaTest.php.
References array.
40 $expected = is_array(
array());
43 $actual = is_array($this->ass_mark_schema->mark_steps);
49 "Constructor failed, mark_steps not an array." Create styles array
The data for the language used.
◆ testCreateSimpleSchemaCustom()
ilassMarkSchemaTest::testCreateSimpleSchemaCustom |
( |
| ) |
|
Test for createSimpleSchema using custom values.
Definition at line 126 of file ilassMarkSchemaTest.php.
References $failed.
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'
◆ testCreateSimpleSchemaDefaults()
ilassMarkSchemaTest::testCreateSimpleSchemaDefaults |
( |
| ) |
|
Test for createSimpleSchema using defaults.
Definition at line 57 of file ilassMarkSchemaTest.php.
References $failed.
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'
◆ testFlush()
ilassMarkSchemaTest::testFlush |
( |
| ) |
|
Test for flush()
Definition at line 202 of file ilassMarkSchemaTest.php.
References array.
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." Create styles array
The data for the language used.
◆ testSaveToDb_regular()
ilassMarkSchemaTest::testSaveToDb_regular |
( |
| ) |
|
◆ $backupGlobals
ilassMarkSchemaTest::$backupGlobals = FALSE |
|
protected |
The documentation for this class was generated from the following file: