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

Public Member Functions

 test_instantiateObject_shouldReturnInstance ()
 
 testDefinitionEditModeEnabled ()
 
 testQuestionAmountColumnEnabled ()
 

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

ilTestRandomQuestionSetSourcePoolDefinitionListTableGUI $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 ilTestRandomQuestionSetSourcePoolDefinitionListTableGUITest

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

Definition at line 25 of file ilTestRandomQuestionSetSourcePoolDefinitionListTableGUITest.php.

Member Function Documentation

◆ setUp()

ilTestRandomQuestionSetSourcePoolDefinitionListTableGUITest::setUp ( )
protected

Reimplemented from ilTestBaseTestCase.

Definition at line 30 of file ilTestRandomQuestionSetSourcePoolDefinitionListTableGUITest.php.

30 : void
31 {
32 parent::setUp();
33
34 $this->addGlobal_uiFactory();
35 $this->addGlobal_uiRenderer();
36 $this->addGlobal_ilAccess();
37
38 $lng_mock = $this->createMock(ilLanguage::class);
39 $ctrl_mock = $this->createMock(ilCtrl::class);
40 $ctrl_mock->expects($this->any())
41 ->method("getFormAction")
42 ->willReturnCallback(function () {
43 return "testFormAction";
44 });
45
46 $this->setGlobalVariable("lng", $lng_mock);
47 $this->setGlobalVariable("ilCtrl", $ctrl_mock);
48 $this->setGlobalVariable("tpl", $this->createMock(ilGlobalPageTemplate::class));
49 $this->setGlobalVariable("component.repository", $this->createMock(ilComponentRepository::class));
50 $component_factory = $this->createMock(ilComponentFactory::class);
51 $component_factory->method("getActivePluginsInSlot")->willReturn(new ArrayIterator());
52 $this->setGlobalVariable("component.factory", $component_factory);
53 $this->setGlobalVariable("ilDB", $this->createMock(ilDBInterface::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));
58 $ctrl_mock,
59 $lng_mock,
60 $this->parentObj_mock,
61 "",
62 $this->createMock(ilAccess::class),
63 $this->createMock(ILIAS\UI\Factory::class),
64 $this->createMock(ILIAS\UI\Renderer::class),
65 [],
66 []
67 );
68 }
setGlobalVariable(string $name, $value)
Class ChatMainBarProvider \MainMenu\Provider.
Class Factory.

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

+ Here is the call graph for this function:

◆ test_instantiateObject_shouldReturnInstance()

ilTestRandomQuestionSetSourcePoolDefinitionListTableGUITest::test_instantiateObject_shouldReturnInstance ( )

Definition at line 70 of file ilTestRandomQuestionSetSourcePoolDefinitionListTableGUITest.php.

70 : void
71 {
72 $this->assertInstanceOf(ilTestRandomQuestionSetSourcePoolDefinitionListTableGUI::class, $this->tableGui);
73 }

◆ testDefinitionEditModeEnabled()

ilTestRandomQuestionSetSourcePoolDefinitionListTableGUITest::testDefinitionEditModeEnabled ( )

Definition at line 75 of file ilTestRandomQuestionSetSourcePoolDefinitionListTableGUITest.php.

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

◆ testQuestionAmountColumnEnabled()

ilTestRandomQuestionSetSourcePoolDefinitionListTableGUITest::testQuestionAmountColumnEnabled ( )

Definition at line 84 of file ilTestRandomQuestionSetSourcePoolDefinitionListTableGUITest.php.

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

Field Documentation

◆ $parentObj_mock

ilObjTestGUI ilTestRandomQuestionSetSourcePoolDefinitionListTableGUITest::$parentObj_mock
private

◆ $tableGui

ilTestRandomQuestionSetSourcePoolDefinitionListTableGUI ilTestRandomQuestionSetSourcePoolDefinitionListTableGUITest::$tableGui
private

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