ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ilTestParticipantsTableGUITest 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 ilTestParticipantsTableGUITest:
+ Collaboration diagram for ilTestParticipantsTableGUITest:

Public Member Functions

 test_instantiateObject_shouldReturnInstance ()
 
 testManageResultsCommandsEnabled ()
 
 testManageInviteesCommandsEnabled ()
 
 testRowKeyDataField ()
 
 testAnonymity ()
 
 testParticipantHasSolutionsFilterEnabled ()
 
 testNumericOrdering ()
 

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

ilTestParticipantsTableGUI $tableGui
 
ilTestParticipantsGUI $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 ilTestParticipantsTableGUITest

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

Definition at line 25 of file ilTestParticipantsTableGUITest.php.

Member Function Documentation

◆ setUp()

ilTestParticipantsTableGUITest::setUp ( )
protected

Definition at line 30 of file ilTestParticipantsTableGUITest.php.

References ilTestBaseTestCase\setGlobalVariable().

30  : void
31  {
32  parent::setUp();
33 
34  $lng_mock = $this->createMock(ilLanguage::class);
35  $ctrl_mock = $this->createMock(ilCtrl::class);
36  $ctrl_mock->expects($this->any())
37  ->method("getFormAction")
38  ->willReturnCallback(function () {
39  return "testFormAction";
40  });
41 
42  $renderer_mock = $this->createMock(\ILIAS\UI\Renderer::class);
43  $ui_factory_mock = $this->createMock(\ILIAS\UI\Factory::class);
44  $this->setGlobalVariable("lng", $lng_mock);
45  $this->setGlobalVariable("ilCtrl", $ctrl_mock);
46  $this->setGlobalVariable("tpl", $this->createMock(ilGlobalPageTemplate::class));
47  $this->setGlobalVariable("ui.renderer", $renderer_mock);
48  $this->setGlobalVariable("ui.factory", $ui_factory_mock);
49 
50  $this->setGlobalVariable("component.repository", $this->createMock(ilComponentRepository::class));
51  $component_factory = $this->createMock(ilComponentFactory::class);
52  $component_factory->method("getActivePluginsInSlot")->willReturn(new ArrayIterator());
53  $this->setGlobalVariable("component.factory", $component_factory);
54  $this->setGlobalVariable("ilDB", $this->createMock(ilDBInterface::class));
55 
56  $this->parentObj_mock = $this->createMock(ilTestParticipantsGUI::class);
57  $objTest_mock = $this->createMock(ilObjTest::class);
58 
59  $this->parentObj_mock
60  ->expects($this->any())
61  ->method("getTestObj")
62  ->willReturn($objTest_mock);
63 
64  $this->parentObj_mock->object = $objTest_mock;
65  $this->tableGui = new ilTestParticipantsTableGUI($this->parentObj_mock, "");
66  }
Class Factory.
Class ChatMainBarProvider .
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setGlobalVariable(string $name, $value)
+ Here is the call graph for this function:

◆ test_instantiateObject_shouldReturnInstance()

ilTestParticipantsTableGUITest::test_instantiateObject_shouldReturnInstance ( )

Definition at line 68 of file ilTestParticipantsTableGUITest.php.

68  : void
69  {
70  $this->assertInstanceOf(ilTestParticipantsTableGUI::class, $this->tableGui);
71  }

◆ testAnonymity()

ilTestParticipantsTableGUITest::testAnonymity ( )

Definition at line 97 of file ilTestParticipantsTableGUITest.php.

97  : void
98  {
99  $this->tableGui->setAnonymity("test");
100  $this->assertEquals("test", $this->tableGui->getAnonymity());
101  }

◆ testManageInviteesCommandsEnabled()

ilTestParticipantsTableGUITest::testManageInviteesCommandsEnabled ( )

Definition at line 82 of file ilTestParticipantsTableGUITest.php.

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

◆ testManageResultsCommandsEnabled()

ilTestParticipantsTableGUITest::testManageResultsCommandsEnabled ( )

Definition at line 73 of file ilTestParticipantsTableGUITest.php.

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

◆ testNumericOrdering()

ilTestParticipantsTableGUITest::testNumericOrdering ( )

Definition at line 112 of file ilTestParticipantsTableGUITest.php.

112  : void
113  {
114  $this->assertTrue($this->tableGui->numericOrdering("access"));
115  $this->assertTrue($this->tableGui->numericOrdering("tries"));
116  $this->assertFalse($this->tableGui->numericOrdering("randomString"));
117  }

◆ testParticipantHasSolutionsFilterEnabled()

ilTestParticipantsTableGUITest::testParticipantHasSolutionsFilterEnabled ( )

Definition at line 103 of file ilTestParticipantsTableGUITest.php.

103  : void
104  {
105  $this->assertIsBool($this->tableGui->isParticipantHasSolutionsFilterEnabled());
106  $this->tableGui->setParticipantHasSolutionsFilterEnabled(false);
107  $this->assertFalse($this->tableGui->isParticipantHasSolutionsFilterEnabled());
108  $this->tableGui->setParticipantHasSolutionsFilterEnabled(true);
109  $this->assertTrue($this->tableGui->isParticipantHasSolutionsFilterEnabled());
110  }

◆ testRowKeyDataField()

ilTestParticipantsTableGUITest::testRowKeyDataField ( )

Definition at line 91 of file ilTestParticipantsTableGUITest.php.

91  : void
92  {
93  $this->tableGui->setRowKeyDataField("test");
94  $this->assertEquals("test", $this->tableGui->getRowKeyDataField());
95  }

Field Documentation

◆ $parentObj_mock

ilTestParticipantsGUI ilTestParticipantsTableGUITest::$parentObj_mock
private

Definition at line 28 of file ilTestParticipantsTableGUITest.php.

◆ $tableGui

ilTestParticipantsTableGUI ilTestParticipantsTableGUITest::$tableGui
private

Definition at line 27 of file ilTestParticipantsTableGUITest.php.


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