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

Public Member Functions

 test_instantiateObject_shouldReturnInstance ()
 
 testAccessResultsCommandsEnabled ()
 
 testManageResultsCommandsEnabled ()
 
 testAnonymity ()
 
 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

ilParticipantsTestResultsTableGUI $tableGui
 
ilParticipantsTestResultsGUI $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 ilParticipantsTestResultsTableGUITest

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

Definition at line 25 of file ilParticipantsTestResultsTableGUITest.php.

Member Function Documentation

◆ setUp()

ilParticipantsTestResultsTableGUITest::setUp ( )
protected

Definition at line 30 of file ilParticipantsTestResultsTableGUITest.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  $this->setGlobalVariable("lng", $lng_mock);
43  $this->setGlobalVariable("ilCtrl", $ctrl_mock);
44  $this->setGlobalVariable("tpl", $this->createMock(ilGlobalPageTemplate::class));
45  $this->setGlobalVariable("component.repository", $this->createMock(ilComponentRepository::class));
46  $component_factory = $this->createMock(ilComponentFactory::class);
47  $component_factory->method("getActivePluginsInSlot")->willReturn(new ArrayIterator());
48  $this->setGlobalVariable("component.factory", $component_factory);
49  $this->setGlobalVariable("ilDB", $this->createMock(ilDBInterface::class));
50 
51  $this->parentObj_mock = $this->createMock(ilParticipantsTestResultsGUI::class);
52  $objTest_mock = $this->createMock(ilObjTest::class);
53 
54  $this->parentObj_mock
55  ->expects($this->any())
56  ->method("getTestObj")
57  ->willReturn($objTest_mock);
58 
59  $this->parentObj_mock->object = $objTest_mock;
60  $this->tableGui = new ilParticipantsTestResultsTableGUI($this->parentObj_mock, "");
61  }
setGlobalVariable(string $name, $value)
+ Here is the call graph for this function:

◆ test_instantiateObject_shouldReturnInstance()

ilParticipantsTestResultsTableGUITest::test_instantiateObject_shouldReturnInstance ( )

Definition at line 63 of file ilParticipantsTestResultsTableGUITest.php.

63  : void
64  {
65  $this->assertInstanceOf(ilParticipantsTestResultsTableGUI::class, $this->tableGui);
66  }

◆ testAccessResultsCommandsEnabled()

ilParticipantsTestResultsTableGUITest::testAccessResultsCommandsEnabled ( )

Definition at line 68 of file ilParticipantsTestResultsTableGUITest.php.

68  : void
69  {
70  $this->assertIsBool($this->tableGui->isAccessResultsCommandsEnabled());
71  $this->tableGui->setAccessResultsCommandsEnabled(true);
72  $this->assertTrue($this->tableGui->isAccessResultsCommandsEnabled());
73 
74  $this->tableGui->setAccessResultsCommandsEnabled(false);
75  $this->assertFalse($this->tableGui->isAccessResultsCommandsEnabled());
76  }

◆ testAnonymity()

ilParticipantsTestResultsTableGUITest::testAnonymity ( )

Definition at line 88 of file ilParticipantsTestResultsTableGUITest.php.

88  : void
89  {
90  $this->tableGui->setAnonymity(true);
91  $this->assertTrue($this->tableGui->getAnonymity());
92 
93  $this->tableGui->setAnonymity(false);
94  $this->assertFalse($this->tableGui->getAnonymity());
95  }

◆ testManageResultsCommandsEnabled()

ilParticipantsTestResultsTableGUITest::testManageResultsCommandsEnabled ( )

Definition at line 78 of file ilParticipantsTestResultsTableGUITest.php.

78  : void
79  {
80  $this->assertIsBool($this->tableGui->isManageResultsCommandsEnabled());
81  $this->tableGui->setManageResultsCommandsEnabled(true);
82  $this->assertTrue($this->tableGui->isManageResultsCommandsEnabled());
83 
84  $this->tableGui->setManageResultsCommandsEnabled(false);
85  $this->assertFalse($this->tableGui->isManageResultsCommandsEnabled());
86  }

◆ testNumericOrdering()

ilParticipantsTestResultsTableGUITest::testNumericOrdering ( )

Definition at line 97 of file ilParticipantsTestResultsTableGUITest.php.

97  : void
98  {
99  $this->assertTrue($this->tableGui->numericOrdering("scored_pass"));
100  $this->assertTrue($this->tableGui->numericOrdering("answered_questions"));
101  $this->assertTrue($this->tableGui->numericOrdering("points"));
102  $this->assertTrue($this->tableGui->numericOrdering("percent_result"));
103  $this->assertFalse($this->tableGui->numericOrdering("randomText"));
104  }

Field Documentation

◆ $parentObj_mock

ilParticipantsTestResultsGUI ilParticipantsTestResultsTableGUITest::$parentObj_mock
private

Definition at line 28 of file ilParticipantsTestResultsTableGUITest.php.

◆ $tableGui

ilParticipantsTestResultsTableGUI ilParticipantsTestResultsTableGUITest::$tableGui
private

Definition at line 27 of file ilParticipantsTestResultsTableGUITest.php.


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