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

Public Member Functions

 test_instantiateObject_shouldReturnInstance ()
 
 testTestAccess ()
 
 testGetTabsManager ()
 
 testRunObject ()
 
 testOutEvaluationObject ()
 
 testBackObject ()
 
 testCancelRandomSelectObject ()
 
 testCancelCreateQuestionObject ()
 
 testCancelRemoveQuestionsObject ()
 
 testMoveQuestionsObject ()
 

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

ilObjTestGUI $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 ilObjTestGUITest

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

Definition at line 25 of file ilObjTestGUITest.php.

Member Function Documentation

◆ setUp()

ilObjTestGUITest::setUp ( )
protected

Definition at line 29 of file ilObjTestGUITest.php.

References ilTestBaseTestCase\addGlobal_filesystem(), ilTestBaseTestCase\addGlobal_http(), ilTestBaseTestCase\addGlobal_ilAccess(), ilTestBaseTestCase\addGlobal_ilComponentRepository(), ilTestBaseTestCase\addGlobal_ilCtrl(), ilTestBaseTestCase\addGlobal_ilDB(), ilTestBaseTestCase\addGlobal_ilErr(), ilTestBaseTestCase\addGlobal_ilias(), ilTestBaseTestCase\addGlobal_ilLocator(), ilTestBaseTestCase\addGlobal_ilSetting(), ilTestBaseTestCase\addGlobal_ilTabs(), ilTestBaseTestCase\addGlobal_ilToolbar(), ilTestBaseTestCase\addGlobal_ilUser(), ilTestBaseTestCase\addGlobal_lng(), ilTestBaseTestCase\addGlobal_objDefinition(), ilTestBaseTestCase\addGlobal_rbacreview(), ilTestBaseTestCase\addGlobal_rbacsystem(), ilTestBaseTestCase\addGlobal_tpl(), ilTestBaseTestCase\addGlobal_tree(), and ilTestBaseTestCase\addGlobal_upload().

29  : void
30  {
31  parent::setUp();
32 
33  $this->markTestSkipped("DB causing issues");
34 
35  $this->addGlobal_lng();
36  $this->addGlobal_ilCtrl();
37  $this->addGlobal_ilDB();
39  $this->addGlobal_tree();
40  $this->addGlobal_http();
41  $this->addGlobal_ilLocator();
42  $this->addGlobal_ilUser();
43  $this->addGlobal_ilAccess();
44  $this->addGlobal_ilSetting();
45  $this->addGlobal_rbacreview();
46  $this->addGlobal_ilToolbar();
47  $this->addGlobal_rbacsystem();
48  $this->addGlobal_filesystem();
49  $this->addGlobal_upload();
50  $this->addGlobal_objDefinition();
51  $this->addGlobal_tpl();
52  $this->addGlobal_ilErr();
53  $this->addGlobal_ilTabs();
54  $this->addGlobal_ilias();
55 
56  $this->testObj = new ilObjTestGUI();
57  }
Class ilObjTestGUI.
+ Here is the call graph for this function:

◆ test_instantiateObject_shouldReturnInstance()

ilObjTestGUITest::test_instantiateObject_shouldReturnInstance ( )

Definition at line 59 of file ilObjTestGUITest.php.

59  : void
60  {
61  $this->assertInstanceOf(ilObjTestGUI::class, $this->testObj);
62  }

◆ testBackObject()

ilObjTestGUITest::testBackObject ( )

Definition at line 110 of file ilObjTestGUITest.php.

References ilObjTestGUI\backObject(), and ilTestBaseTestCase\setGlobalVariable().

110  : void
111  {
112  $ctrl_mock = $this->createMock(ilCtrl::class);
113  $ctrl_mock
114  ->expects($this->once())
115  ->method("redirect")
116  ->with($this->testObj, "questions");
117  $this->setGlobalVariable("ilCtrl", $ctrl_mock);
118 
119  $testObj = new ilObjTestGUI();
120 
121  $testObj->backObject();
122  }
Class ilObjTestGUI.
setGlobalVariable(string $name, $value)
backObject()
Called when the back button in the question browser was pressed.
ilObjTestGUI $testObj
+ Here is the call graph for this function:

◆ testCancelCreateQuestionObject()

ilObjTestGUITest::testCancelCreateQuestionObject ( )

Definition at line 138 of file ilObjTestGUITest.php.

References ilObjTestGUI\cancelCreateQuestionObject(), and ilTestBaseTestCase\setGlobalVariable().

138  : void
139  {
140  $ctrl_mock = $this->createMock(ilCtrl::class);
141  $ctrl_mock
142  ->expects($this->once())
143  ->method("redirect")
144  ->with($this->testObj, "questions");
145  $this->setGlobalVariable("ilCtrl", $ctrl_mock);
146 
147  $testObj = new ilObjTestGUI();
148 
150  }
Class ilObjTestGUI.
cancelCreateQuestionObject()
Called when the creation of a new question is cancelled.
setGlobalVariable(string $name, $value)
ilObjTestGUI $testObj
+ Here is the call graph for this function:

◆ testCancelRandomSelectObject()

ilObjTestGUITest::testCancelRandomSelectObject ( )

Definition at line 124 of file ilObjTestGUITest.php.

References ilObjTestGUI\cancelRandomSelectObject(), and ilTestBaseTestCase\setGlobalVariable().

124  : void
125  {
126  $ctrl_mock = $this->createMock(ilCtrl::class);
127  $ctrl_mock
128  ->expects($this->once())
129  ->method("redirect")
130  ->with($this->testObj, "questions");
131  $this->setGlobalVariable("ilCtrl", $ctrl_mock);
132 
133  $testObj = new ilObjTestGUI();
134 
136  }
Class ilObjTestGUI.
setGlobalVariable(string $name, $value)
ilObjTestGUI $testObj
+ Here is the call graph for this function:

◆ testCancelRemoveQuestionsObject()

ilObjTestGUITest::testCancelRemoveQuestionsObject ( )

Definition at line 152 of file ilObjTestGUITest.php.

References ilObjTestGUI\cancelRemoveQuestionsObject(), and ilTestBaseTestCase\setGlobalVariable().

152  : void
153  {
154  $ctrl_mock = $this->createMock(ilCtrl::class);
155  $ctrl_mock
156  ->expects($this->once())
157  ->method("redirect")
158  ->with($this->testObj, "questions");
159  $this->setGlobalVariable("ilCtrl", $ctrl_mock);
160 
161  $testObj = new ilObjTestGUI();
162 
164  }
Class ilObjTestGUI.
cancelRemoveQuestionsObject()
Cancels the removal of questions from the test.
setGlobalVariable(string $name, $value)
ilObjTestGUI $testObj
+ Here is the call graph for this function:

◆ testGetTabsManager()

ilObjTestGUITest::testGetTabsManager ( )

Definition at line 73 of file ilObjTestGUITest.php.

73  : void
74  {
75  $this->assertNull($this->testObj->getTabsManager());
76  $testTabsManager_mock = $this->createMock(ilTestTabsManager::class);
77 
78  $this->testObj->setTabsManager($testTabsManager_mock);
79  $this->assertEquals($testTabsManager_mock, $this->testObj->getTabsManager());
80  }

◆ testMoveQuestionsObject()

ilObjTestGUITest::testMoveQuestionsObject ( )

Definition at line 166 of file ilObjTestGUITest.php.

References ilObjTestGUI\moveQuestionsObject(), and ilTestBaseTestCase\setGlobalVariable().

166  : void
167  {
168  $_POST['q_id'] = 1;
169 
170  $ctrl_mock = $this->createMock(ilCtrl::class);
171  $ctrl_mock
172  ->expects($this->once())
173  ->method("redirect")
174  ->with($this->testObj, "questions");
175  $this->setGlobalVariable("ilCtrl", $ctrl_mock);
176 
177  $testObj = new ilObjTestGUI();
178 
180  }
Class ilObjTestGUI.
setGlobalVariable(string $name, $value)
moveQuestionsObject()
Marks selected questions for moving.
ilObjTestGUI $testObj
+ Here is the call graph for this function:

◆ testOutEvaluationObject()

ilObjTestGUITest::testOutEvaluationObject ( )

Definition at line 96 of file ilObjTestGUITest.php.

References ilObjTestGUI\outEvaluationObject(), and ilTestBaseTestCase\setGlobalVariable().

96  : void
97  {
98  $ctrl_mock = $this->createMock(ilCtrl::class);
99  $ctrl_mock
100  ->expects($this->once())
101  ->method("redirectByClass")
102  ->with("iltestevaluationgui", "outEvaluation");
103  $this->setGlobalVariable("ilCtrl", $ctrl_mock);
104 
105  $testObj = new ilObjTestGUI();
106 
108  }
Class ilObjTestGUI.
setGlobalVariable(string $name, $value)
ilObjTestGUI $testObj
+ Here is the call graph for this function:

◆ testRunObject()

ilObjTestGUITest::testRunObject ( )

Definition at line 82 of file ilObjTestGUITest.php.

References ilObjTestGUI\runObject(), and ilTestBaseTestCase\setGlobalVariable().

82  : void
83  {
84  $ctrl_mock = $this->createMock(ilCtrl::class);
85  $ctrl_mock
86  ->expects($this->once())
87  ->method("redirect")
88  ->with($this->testObj, "infoScreen");
89  $this->setGlobalVariable("ilCtrl", $ctrl_mock);
90 
91  $testObj = new ilObjTestGUI();
92 
94  }
Class ilObjTestGUI.
setGlobalVariable(string $name, $value)
ilObjTestGUI $testObj
+ Here is the call graph for this function:

◆ testTestAccess()

ilObjTestGUITest::testTestAccess ( )

Definition at line 64 of file ilObjTestGUITest.php.

64  : void
65  {
66  $this->assertNull($this->testObj->getTestAccess());
67  $testAccess_mock = $this->createMock(ilTestAccess::class);
68 
69  $this->testObj->setTestAccess($testAccess_mock);
70  $this->assertEquals($testAccess_mock, $this->testObj->getTestAccess());
71  }

Field Documentation

◆ $testObj

ilObjTestGUI ilObjTestGUITest::$testObj
private

Definition at line 27 of file ilObjTestGUITest.php.


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