ILIAS  release_8 Revision v8.24
assSingleChoiceTest Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Inheritance diagram for assSingleChoiceTest:
+ Collaboration diagram for assSingleChoiceTest:

Public Member Functions

 test_getThumbPrefix_shouldReturnString ()
 
 test_setOutputType_shouldReturngetOutputType ()
 
 test_getQuestionType_shouldReturnQuestionType ()
 
 test_getAdditionalTableName_shouldReturnAdditionalTableName ()
 
 test_getAnswerTableName_shouldReturnAnswerTableName ()
 

Protected Member Functions

 setUp ()
 
- Protected Member Functions inherited from assBaseTestCase
 setUp ()
 
 tearDown ()
 
 setGlobalVariable (string $name, $value)
 
 getGlobalTemplateMock ()
 
 getDatabaseMock ()
 
 getIliasMock ()
 

Protected Attributes

 $backupGlobals = false
 
- Protected Attributes inherited from assBaseTestCase
Container $dic = null
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning 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 28 of file assSingleChoiceTest.php.

Member Function Documentation

◆ setUp()

assSingleChoiceTest::setUp ( )
protected

Reimplemented from assBaseTestCase.

Definition at line 32 of file assSingleChoiceTest.php.

32 : void
33 {
34 parent::setUp();
35 $this->setGlobalVariable('ilias', $this->getIliasMock());
36 $this->setGlobalVariable('tpl', $this->getGlobalTemplateMock());
37 }
setGlobalVariable(string $name, $value)

References assBaseTestCase\getGlobalTemplateMock(), assBaseTestCase\getIliasMock(), and assBaseTestCase\setGlobalVariable().

+ Here is the call graph for this function:

◆ test_getAdditionalTableName_shouldReturnAdditionalTableName()

assSingleChoiceTest::test_getAdditionalTableName_shouldReturnAdditionalTableName ( )

Definition at line 93 of file assSingleChoiceTest.php.

93 : void
94 {
95 $obj = new assSingleChoice();
96 $this->assertEquals('qpl_qst_sc', $obj->getAdditionalTableName());
97 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

◆ test_getAnswerTableName_shouldReturnAnswerTableName()

assSingleChoiceTest::test_getAnswerTableName_shouldReturnAnswerTableName ( )

Definition at line 99 of file assSingleChoiceTest.php.

99 : void
100 {
101 $obj = new assSingleChoice();
102 $this->assertEquals('qpl_a_sc', $obj->getAnswerTableName());
103 }

◆ test_getQuestionType_shouldReturnQuestionType()

assSingleChoiceTest::test_getQuestionType_shouldReturnQuestionType ( )

Definition at line 87 of file assSingleChoiceTest.php.

87 : void
88 {
89 $obj = new assSingleChoice();
90 $this->assertEquals('assSingleChoice', $obj->getQuestionType());
91 }

◆ test_getThumbPrefix_shouldReturnString()

assSingleChoiceTest::test_getThumbPrefix_shouldReturnString ( )

Definition at line 52 of file assSingleChoiceTest.php.

52 : void
53 {
54 $obj = new assSingleChoice();
55 $this->assertEquals('thumb.', $obj->getThumbPrefix());
56 }

◆ test_setOutputType_shouldReturngetOutputType()

assSingleChoiceTest::test_setOutputType_shouldReturngetOutputType ( )

Definition at line 58 of file assSingleChoiceTest.php.

58 : void
59 {
60 $obj = new assSingleChoice();
61 $obj->setOutputType(0);
62 $this->assertEquals(0, $obj->getOutputType());
63 }

Field Documentation

◆ $backupGlobals

assSingleChoiceTest::$backupGlobals = false
protected

Definition at line 30 of file assSingleChoiceTest.php.


The documentation for this class was generated from the following file: