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

Public Member Functions

 test_instantiateObject_shouldReturnInstance ()
 
 testQuestionManagingEnabled ()
 
 testPositionInsertCommandsEnabled ()
 
 testQuestionPositioningEnabled ()
 
 testObligatoryQuestionsHandlingEnabled ()
 
 testTotalPoints ()
 
 testQuestionRemoveRowButtonEnabled ()
 

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

ilTestQuestionsTableGUI $tableGui
 
ilObjTestGUI $parentObj_mock
 

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 ilTestQuestionsTableGUITest

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

Definition at line 25 of file ilTestQuestionsTableGUITest.php.

Member Function Documentation

◆ setUp()

ilTestQuestionsTableGUITest::setUp ( )
protected

Reimplemented from ilTestBaseTestCase.

Definition at line 30 of file ilTestQuestionsTableGUITest.php.

30 : void
31 {
32 parent::setUp();
33
34 $this->addGlobal_ilAccess();
35
36 $lng_mock = $this->createMock(ilLanguage::class);
37 $ctrl_mock = $this->createMock(ilCtrl::class);
38 $ctrl_mock->expects($this->any())
39 ->method("getFormAction")
40 ->willReturnCallback(function () {
41 return "testFormAction";
42 });
43
44 $this->setGlobalVariable("lng", $lng_mock);
45 $this->setGlobalVariable("ilCtrl", $ctrl_mock);
46 $this->setGlobalVariable("tpl", $this->createMock(ilGlobalPageTemplate::class));
47 $this->setGlobalVariable("component.repository", $this->createMock(ilComponentRepository::class));
48 $component_factory = $this->createMock(ilComponentFactory::class);
49 $component_factory->method("getActivePluginsInSlot")->willReturn(new ArrayIterator());
50 $this->setGlobalVariable("component.factory", $component_factory);
51 $this->setGlobalVariable("ilDB", $this->createMock(ilDBInterface::class));
52 $this->setGlobalVariable("ui.renderer", $this->createMock(\ILIAS\UI\Renderer::class));
53 $this->setGlobalVariable("ui.factory", $this->createMock(\ILIAS\UI\Factory::class));
54
55 $this->parentObj_mock = $this->getMockBuilder(ilObjTestGUI::class)->disableOriginalConstructor()->onlyMethods(array('getObject'))->getMock();
56 $this->parentObj_mock->expects($this->any())->method('getObject')->willReturn($this->createMock(ilObjTest::class));
57 $this->tableGui = new ilTestQuestionsTableGUI($this->parentObj_mock, "", 0);
58 }
setGlobalVariable(string $name, $value)
Class ChatMainBarProvider \MainMenu\Provider.
Class Factory.

References ilTestBaseTestCase\addGlobal_ilAccess(), and ilTestBaseTestCase\setGlobalVariable().

+ Here is the call graph for this function:

◆ test_instantiateObject_shouldReturnInstance()

ilTestQuestionsTableGUITest::test_instantiateObject_shouldReturnInstance ( )

Definition at line 60 of file ilTestQuestionsTableGUITest.php.

60 : void
61 {
62 $this->assertInstanceOf(ilTestQuestionsTableGUI::class, $this->tableGui);
63 }

◆ testObligatoryQuestionsHandlingEnabled()

ilTestQuestionsTableGUITest::testObligatoryQuestionsHandlingEnabled ( )

Definition at line 92 of file ilTestQuestionsTableGUITest.php.

92 : void
93 {
94 $this->assertIsBool($this->tableGui->isObligatoryQuestionsHandlingEnabled());
95 $this->tableGui->setObligatoryQuestionsHandlingEnabled(false);
96 $this->assertFalse($this->tableGui->isObligatoryQuestionsHandlingEnabled());
97 $this->tableGui->setObligatoryQuestionsHandlingEnabled(true);
98 $this->assertTrue($this->tableGui->isObligatoryQuestionsHandlingEnabled());
99 }

◆ testPositionInsertCommandsEnabled()

ilTestQuestionsTableGUITest::testPositionInsertCommandsEnabled ( )

Definition at line 74 of file ilTestQuestionsTableGUITest.php.

74 : void
75 {
76 $this->assertIsBool($this->tableGui->isPositionInsertCommandsEnabled());
77 $this->tableGui->setPositionInsertCommandsEnabled(false);
78 $this->assertFalse($this->tableGui->isPositionInsertCommandsEnabled());
79 $this->tableGui->setPositionInsertCommandsEnabled(true);
80 $this->assertTrue($this->tableGui->isPositionInsertCommandsEnabled());
81 }

◆ testQuestionManagingEnabled()

ilTestQuestionsTableGUITest::testQuestionManagingEnabled ( )

Definition at line 65 of file ilTestQuestionsTableGUITest.php.

65 : void
66 {
67 $this->assertIsBool($this->tableGui->isQuestionManagingEnabled());
68 $this->tableGui->setQuestionManagingEnabled(false);
69 $this->assertFalse($this->tableGui->isQuestionManagingEnabled());
70 $this->tableGui->setQuestionManagingEnabled(true);
71 $this->assertTrue($this->tableGui->isQuestionManagingEnabled());
72 }

◆ testQuestionPositioningEnabled()

ilTestQuestionsTableGUITest::testQuestionPositioningEnabled ( )

Definition at line 83 of file ilTestQuestionsTableGUITest.php.

83 : void
84 {
85 $this->assertIsBool($this->tableGui->isQuestionPositioningEnabled());
86 $this->tableGui->setQuestionPositioningEnabled(false);
87 $this->assertFalse($this->tableGui->isQuestionPositioningEnabled());
88 $this->tableGui->setQuestionPositioningEnabled(true);
89 $this->assertTrue($this->tableGui->isQuestionPositioningEnabled());
90 }

◆ testQuestionRemoveRowButtonEnabled()

ilTestQuestionsTableGUITest::testQuestionRemoveRowButtonEnabled ( )

Definition at line 108 of file ilTestQuestionsTableGUITest.php.

108 : void
109 {
110 $this->assertIsBool($this->tableGui->isQuestionRemoveRowButtonEnabled());
111 $this->tableGui->setQuestionRemoveRowButtonEnabled(false);
112 $this->assertFalse($this->tableGui->isQuestionRemoveRowButtonEnabled());
113 $this->tableGui->setQuestionRemoveRowButtonEnabled(true);
114 $this->assertTrue($this->tableGui->isQuestionRemoveRowButtonEnabled());
115 }

◆ testTotalPoints()

ilTestQuestionsTableGUITest::testTotalPoints ( )

Definition at line 101 of file ilTestQuestionsTableGUITest.php.

101 : void
102 {
103 $this->assertIsFloat($this->tableGui->getTotalPoints());
104 $this->tableGui->setTotalPoints(125.251);
105 $this->assertEquals(125.251, $this->tableGui->getTotalPoints());
106 }

Field Documentation

◆ $parentObj_mock

ilObjTestGUI ilTestQuestionsTableGUITest::$parentObj_mock
private

Definition at line 28 of file ilTestQuestionsTableGUITest.php.

◆ $tableGui

ilTestQuestionsTableGUI ilTestQuestionsTableGUITest::$tableGui
private

Definition at line 27 of file ilTestQuestionsTableGUITest.php.


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