ILIAS  release_8 Revision v8.25
ilTestDynamicQuestionSetFilterSelectionTest 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 ilTestDynamicQuestionSetFilterSelectionTest:
+ Collaboration diagram for ilTestDynamicQuestionSetFilterSelectionTest:

Public Member Functions

 test_instantiateObject_shouldReturnInstance ()
 
 testAnswerStatusActiveId ()
 
 testAnswerStatusSelection ()
 
 testHasAnswerStatusSelection ()
 
 testIsAnswerStatusSelectionWrongAnswered ()
 
 testSetTaxonomySelection ()
 
 testHasSelectedTaxonomy ()
 
 testGetSelectedTaxonomy ()
 
 testForcedQuestionIds ()
 

Protected Member Functions

 setUp ()
 
- Protected Member Functions inherited from ilTestBaseTestCase
 setUp ()
 
 tearDown ()
 
 setGlobalVariable (string $name, $value)
 
 getGlobalTemplateMock ()
 
 getDatabaseMock ()
 
 getIliasMock ()
 
 addGlobal_ilAccess ()
 
 addGlobal_ilUser ()
 
 addGlobal_objDefinition ()
 
 addGlobal_tree ()
 
 addGlobal_ilSetting ()
 
 addGlobal_rbacsystem ()
 
 addGlobal_ilCtrl ()
 
 addGlobal_lng ()
 
 addGlobal_filesystem ()
 
 addGlobal_upload ()
 
 addGlobal_ilDB ()
 
 addGlobal_ilLog ()
 
 addGlobal_ilias ()
 
 addGlobal_ilErr ()
 
 addGlobal_ilAppEventHandler ()
 
 addGlobal_tpl ()
 
 addGlobal_ilComponentRepository ()
 
 addGlobal_ilTabs ()
 
 addGlobal_ilObjDataCache ()
 
 addGlobal_ilLocator ()
 
 addGlobal_rbacreview ()
 
 addGlobal_ilToolbar ()
 
 addGlobal_http ()
 
 addGlobal_ilIliasIniFile ()
 
 addGlobal_ilLoggerFactory ()
 
 addGlobal_ilHelp ()
 
 addGlobal_ui ()
 
 addGlobal_uiFactory ()
 
 addGlobal_uiRenderer ()
 
 addGlobal_refinery ()
 

Private Attributes

ilTestDynamicQuestionSetFilterSelection $testObj
 

Additional Inherited Members

- Protected Attributes inherited from ilTestBaseTestCase
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 Class ilTestDynamicQuestionSetFilterSelectionTest

Author
Marvin Beym mbeym.nosp@m.@dat.nosp@m.abay..nosp@m.de

Definition at line 25 of file ilTestDynamicQuestionSetFilterSelectionTest.php.

Member Function Documentation

◆ setUp()

ilTestDynamicQuestionSetFilterSelectionTest::setUp ( )
protected

Reimplemented from ilTestBaseTestCase.

Definition at line 29 of file ilTestDynamicQuestionSetFilterSelectionTest.php.

◆ test_instantiateObject_shouldReturnInstance()

ilTestDynamicQuestionSetFilterSelectionTest::test_instantiateObject_shouldReturnInstance ( )

Definition at line 36 of file ilTestDynamicQuestionSetFilterSelectionTest.php.

36 : void
37 {
38 $this->assertInstanceOf(ilTestDynamicQuestionSetFilterSelection::class, $this->testObj);
39 }

◆ testAnswerStatusActiveId()

ilTestDynamicQuestionSetFilterSelectionTest::testAnswerStatusActiveId ( )

Definition at line 41 of file ilTestDynamicQuestionSetFilterSelectionTest.php.

41 : void
42 {
43 $this->testObj->setAnswerStatusActiveId(1250);
44 $this->assertEquals(1250, $this->testObj->getAnswerStatusActiveId());
45 }

◆ testAnswerStatusSelection()

ilTestDynamicQuestionSetFilterSelectionTest::testAnswerStatusSelection ( )

Definition at line 47 of file ilTestDynamicQuestionSetFilterSelectionTest.php.

47 : void
48 {
49 $this->testObj->setAnswerStatusSelection("testString");
50 $this->assertEquals("testString", $this->testObj->getAnswerStatusSelection());
51 }

◆ testForcedQuestionIds()

ilTestDynamicQuestionSetFilterSelectionTest::testForcedQuestionIds ( )

Definition at line 117 of file ilTestDynamicQuestionSetFilterSelectionTest.php.

117 : void
118 {
119 $expected = [120, 1250, 12501];
120 $this->testObj->setForcedQuestionIds($expected);
121
122 $this->assertEquals($expected, $this->testObj->getForcedQuestionIds());
123 }

◆ testGetSelectedTaxonomy()

ilTestDynamicQuestionSetFilterSelectionTest::testGetSelectedTaxonomy ( )

Definition at line 109 of file ilTestDynamicQuestionSetFilterSelectionTest.php.

109 : void
110 {
111 $expected = [12591 => ["random", "array"]];
112 $this->testObj->setTaxonomySelection($expected);
113
114 $this->assertEquals($expected[12591], $this->testObj->getSelectedTaxonomy(12591));
115 }

◆ testHasAnswerStatusSelection()

ilTestDynamicQuestionSetFilterSelectionTest::testHasAnswerStatusSelection ( )

Definition at line 53 of file ilTestDynamicQuestionSetFilterSelectionTest.php.

53 : void
54 {
55 $this->testObj->setAnswerStatusSelection(
57 );
58 $this->assertTrue($this->testObj->hasAnswerStatusSelection());
59
60 $this->testObj->setAnswerStatusSelection(
62 );
63 $this->assertTrue($this->testObj->hasAnswerStatusSelection());
64
65 $this->testObj->setAnswerStatusSelection(
67 );
68 $this->assertTrue($this->testObj->hasAnswerStatusSelection());
69
70 $this->testObj->setAnswerStatusSelection("testString");
71 $this->assertFalse($this->testObj->hasAnswerStatusSelection());
72 }

References ilTestDynamicQuestionSetFilterSelection\ANSWER_STATUS_FILTER_VALUE_ALL_NON_CORRECT, ilTestDynamicQuestionSetFilterSelection\ANSWER_STATUS_FILTER_VALUE_NON_ANSWERED, and ilTestDynamicQuestionSetFilterSelection\ANSWER_STATUS_FILTER_VALUE_WRONG_ANSWERED.

◆ testHasSelectedTaxonomy()

ilTestDynamicQuestionSetFilterSelectionTest::testHasSelectedTaxonomy ( )

Definition at line 100 of file ilTestDynamicQuestionSetFilterSelectionTest.php.

100 : void
101 {
102 $expected = [12591 => "random", 125919 => "array"];
103 $this->testObj->setTaxonomySelection($expected);
104
105 $this->assertTrue($this->testObj->hasSelectedTaxonomy(125919));
106 $this->assertFalse($this->testObj->hasSelectedTaxonomy(222));
107 }

◆ testIsAnswerStatusSelectionWrongAnswered()

ilTestDynamicQuestionSetFilterSelectionTest::testIsAnswerStatusSelectionWrongAnswered ( )

Definition at line 74 of file ilTestDynamicQuestionSetFilterSelectionTest.php.

74 : void
75 {
76 $this->testObj->setAnswerStatusSelection(
78 );
79 $this->assertFalse($this->testObj->isAnswerStatusSelectionWrongAnswered());
80
81 $this->testObj->setAnswerStatusSelection(
83 );
84 $this->assertFalse($this->testObj->isAnswerStatusSelectionWrongAnswered());
85
86 $this->testObj->setAnswerStatusSelection(
88 );
89 $this->assertTrue($this->testObj->isAnswerStatusSelectionWrongAnswered());
90 }

References ilTestDynamicQuestionSetFilterSelection\ANSWER_STATUS_FILTER_VALUE_ALL_NON_CORRECT, ilTestDynamicQuestionSetFilterSelection\ANSWER_STATUS_FILTER_VALUE_NON_ANSWERED, and ilTestDynamicQuestionSetFilterSelection\ANSWER_STATUS_FILTER_VALUE_WRONG_ANSWERED.

◆ testSetTaxonomySelection()

ilTestDynamicQuestionSetFilterSelectionTest::testSetTaxonomySelection ( )

Definition at line 92 of file ilTestDynamicQuestionSetFilterSelectionTest.php.

92 : void
93 {
94 $expected = [12591 => "random", 125919 => "array"];
95 $this->testObj->setTaxonomySelection($expected);
96
97 $this->assertEquals($expected, $this->testObj->getTaxonomySelection());
98 }

Field Documentation

◆ $testObj

ilTestDynamicQuestionSetFilterSelection ilTestDynamicQuestionSetFilterSelectionTest::$testObj
private

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