ILIAS  trunk Revision v12.0_alpha-1540-g00f839d5fa1
assKprimChoiceTest 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 assKprimChoiceTest:
+ Collaboration diagram for assKprimChoiceTest:

Public Member Functions

 test_instantiateObject_shouldReturnInstance ()
 
 test_getQuestionType_shouldReturnQuestionType ()
 
 test_getAdditionalTableName_shouldReturnAdditionalTableName ()
 
 test_getAnswerTableName_shouldReturnAnswerTableName ()
 
 test_isValidOptionLabel_shouldReturnTrue ()
 
 test_isValidAnswerType_shouldReturnTrue ()
 

Protected Member Functions

 setUp ()
 
- Protected Member Functions inherited from assBaseTestCase
 setUp ()
 
 tearDown ()
 
 getIRSSMock ()
 

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

Author
Guido Vollbach <gvollbachdatabay.de>

\

Definition at line 26 of file assKprimChoiceTest.php.

Member Function Documentation

◆ setUp()

assKprimChoiceTest::setUp ( )
protected

Reimplemented from assBaseTestCase.

Definition at line 30 of file assKprimChoiceTest.php.

30 : void
31 {
32 parent::setUp();
33 $this->setGlobalVariable('ilias', $this->getIliasMock());
34 }
setGlobalVariable(string $name, mixed $value)

References getIliasMock(), and setGlobalVariable().

+ Here is the call graph for this function:

◆ test_getAdditionalTableName_shouldReturnAdditionalTableName()

assKprimChoiceTest::test_getAdditionalTableName_shouldReturnAdditionalTableName ( )

Definition at line 48 of file assKprimChoiceTest.php.

48 : void
49 {
50 $obj = new assKprimChoice();
51 $this->assertEquals('qpl_qst_kprim', $obj->getAdditionalTableName());
52 }

◆ test_getAnswerTableName_shouldReturnAnswerTableName()

assKprimChoiceTest::test_getAnswerTableName_shouldReturnAnswerTableName ( )

Definition at line 54 of file assKprimChoiceTest.php.

54 : void
55 {
56 $obj = new assKprimChoice();
57 $this->assertEquals('qpl_a_kprim', $obj->getAnswerTableName());
58 }

◆ test_getQuestionType_shouldReturnQuestionType()

assKprimChoiceTest::test_getQuestionType_shouldReturnQuestionType ( )

Definition at line 42 of file assKprimChoiceTest.php.

42 : void
43 {
44 $obj = new assKprimChoice();
45 $this->assertEquals('assKprimChoice', $obj->getQuestionType());
46 }

◆ test_instantiateObject_shouldReturnInstance()

assKprimChoiceTest::test_instantiateObject_shouldReturnInstance ( )

Definition at line 36 of file assKprimChoiceTest.php.

36 : void
37 {
38 $instance = new assKprimChoice();
39 $this->assertInstanceOf('assKprimChoice', $instance);
40 }

◆ test_isValidAnswerType_shouldReturnTrue()

assKprimChoiceTest::test_isValidAnswerType_shouldReturnTrue ( )

Definition at line 67 of file assKprimChoiceTest.php.

67 : void
68 {
69 $obj = new assKprimChoice();
70 $this->assertEquals(false, $obj->isValidAnswerType('not valid'));
71 $this->assertEquals(true, $obj->isValidAnswerType($obj::ANSWER_TYPE_SINGLE_LINE));
72 }

◆ test_isValidOptionLabel_shouldReturnTrue()

assKprimChoiceTest::test_isValidOptionLabel_shouldReturnTrue ( )

Definition at line 60 of file assKprimChoiceTest.php.

60 : void
61 {
62 $obj = new assKprimChoice();
63 $this->assertEquals(false, $obj->isValidOptionLabel('not valid'));
64 $this->assertEquals(true, $obj->isValidOptionLabel($obj::OPTION_LABEL_RIGHT_WRONG));
65 }

Field Documentation

◆ $backupGlobals

assKprimChoiceTest::$backupGlobals = false
protected

Definition at line 28 of file assKprimChoiceTest.php.


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