ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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 25 of file assKprimChoiceTest.php.

Member Function Documentation

◆ setUp()

assKprimChoiceTest::setUp ( )
protected

Reimplemented from assBaseTestCase.

Definition at line 29 of file assKprimChoiceTest.php.

29 : void
30 {
31 parent::setUp();
32 $this->setGlobalVariable('ilias', $this->getIliasMock());
33 }
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 47 of file assKprimChoiceTest.php.

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

◆ test_getAnswerTableName_shouldReturnAnswerTableName()

assKprimChoiceTest::test_getAnswerTableName_shouldReturnAnswerTableName ( )

Definition at line 53 of file assKprimChoiceTest.php.

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

◆ test_getQuestionType_shouldReturnQuestionType()

assKprimChoiceTest::test_getQuestionType_shouldReturnQuestionType ( )

Definition at line 41 of file assKprimChoiceTest.php.

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

◆ test_instantiateObject_shouldReturnInstance()

assKprimChoiceTest::test_instantiateObject_shouldReturnInstance ( )

Definition at line 35 of file assKprimChoiceTest.php.

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

◆ test_isValidAnswerType_shouldReturnTrue()

assKprimChoiceTest::test_isValidAnswerType_shouldReturnTrue ( )

Definition at line 66 of file assKprimChoiceTest.php.

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

◆ test_isValidOptionLabel_shouldReturnTrue()

assKprimChoiceTest::test_isValidOptionLabel_shouldReturnTrue ( )

Definition at line 59 of file assKprimChoiceTest.php.

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

Field Documentation

◆ $backupGlobals

assKprimChoiceTest::$backupGlobals = false
protected

Definition at line 27 of file assKprimChoiceTest.php.


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