Unit tests for single choice questions.
More...
Unit tests for single choice questions.
- Author
- Helmut Schottmüller ilias.nosp@m.@aur.nosp@m.ealis.nosp@m..de
- Version
- $Id$
Definition at line 13 of file assSingleChoiceTest.php.
◆ setUp()
assSingleChoiceTest::setUp |
( |
| ) |
|
|
protected |
Definition at line 17 of file assSingleChoiceTest.php.
19 require_once
'./Modules/TestQuestionPool/classes/class.assSingleChoice.php';
20 if (defined(
'ILIAS_PHPUNIT_CONTEXT')) {
21 include_once(
"./Services/PHPUnit/classes/class.ilUnitUtil.php");
22 ilUnitUtil::performInitialisation();
24 chdir(dirname(__FILE__));
27 require_once
'./Services/Utilities/classes/class.ilUtil.php';
◆ test_getAdditionalTableName_shouldReturnAdditionalTableName()
assSingleChoiceTest::test_getAdditionalTableName_shouldReturnAdditionalTableName |
( |
| ) |
|
Definition at line 140 of file assSingleChoiceTest.php.
143 $this->assertEquals(
'qpl_qst_sc', $obj->getAdditionalTableName());
Class for single choice questions.
◆ test_getAnswerTableName_shouldReturnAnswerTableName()
assSingleChoiceTest::test_getAnswerTableName_shouldReturnAnswerTableName |
( |
| ) |
|
Definition at line 146 of file assSingleChoiceTest.php.
149 $this->assertEquals(
'qpl_a_sc', $obj->getAnswerTableName());
Class for single choice questions.
◆ test_getQuestionType_shouldReturnQuestionType()
assSingleChoiceTest::test_getQuestionType_shouldReturnQuestionType |
( |
| ) |
|
Definition at line 134 of file assSingleChoiceTest.php.
137 $this->assertEquals(
'assSingleChoice', $obj->getQuestionType());
Class for single choice questions.
◆ test_getThumbPrefix_shouldReturnString()
assSingleChoiceTest::test_getThumbPrefix_shouldReturnString |
( |
| ) |
|
Create a sample question and save it to the database.
- Parameters
-
integer | $obj_id | Object ID of the containing question pool object (optional) |
- Returns
- integer ID of the newly created question Question creation test
- Parameters
-
Definition at line 99 of file assSingleChoiceTest.php.
102 $this->assertEquals(
'thumb.', $obj->getThumbPrefix());
Class for single choice questions.
◆ test_setOutputType_shouldReturngetOutputType()
assSingleChoiceTest::test_setOutputType_shouldReturngetOutputType |
( |
| ) |
|
Definition at line 105 of file assSingleChoiceTest.php.
108 $obj->setOutputType(0);
109 $this->assertEquals(0, $obj->getOutputType());
Class for single choice questions.
◆ $backupGlobals
assSingleChoiceTest::$backupGlobals = false |
|
protected |
The documentation for this class was generated from the following file: