ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
ilParticipantsTestResultsTableGUITest Class Reference

Class ilParticipantsTestResultsTableGUITest. More...

+ Inheritance diagram for ilParticipantsTestResultsTableGUITest:
+ Collaboration diagram for ilParticipantsTestResultsTableGUITest:

Public Member Functions

 test_instantiateObject_shouldReturnInstance ()
 
 testAccessResultsCommandsEnabled ()
 
 testManageResultsCommandsEnabled ()
 
 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_ilRbacAdmin ()
 
 addGlobal_ilCtrl ()
 
 addGlobal_lng ()
 
 addGlobal_filesystem ()
 
 addGlobal_upload ()
 
 addGlobal_ilDB ()
 
 addGlobal_ilBench ()
 
 addGlobal_ilLog ()
 
 addGlobal_ilias ()
 
 addGlobal_ilErr ()
 
 addGlobal_GlobalScreenService ()
 
 addGlobal_ilNavigationHistory ()
 
 addGlobal_ilAppEventHandler ()
 
 addGlobal_tpl ()
 
 addGlobal_ilComponentRepository ()
 
 addGlobal_ilComponentFactory ()
 
 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 ()
 
 addGlobal_skillService ()
 
 addGlobal_objectService ()
 
 addGlobal_resourceStorage ()
 
 getTestObjMock ()
 

Private Attributes

ilParticipantsTestResultsTableGUI $tableGui
 
ilParticipantsTestResultsGUI $parentObj_mock
 

Additional Inherited Members

- Protected Attributes inherited from ilTestBaseTestCase
Container $dic = null
 

Detailed Description

Member Function Documentation

◆ setUp()

ilParticipantsTestResultsTableGUITest::setUp ( )
protected

Definition at line 30 of file ilParticipantsTestResultsTableGUITest.php.

References $DIC, ilTestBaseTestCase\addGlobal_ilComponentRepository(), ilTestBaseTestCase\addGlobal_lng(), ilTestBaseTestCase\addGlobal_tpl(), ilTestBaseTestCase\addGlobal_uiFactory(), ilTestBaseTestCase\addGlobal_uiRenderer(), and ilTestBaseTestCase\setGlobalVariable().

30  : void
31  {
32  global $DIC;
33  parent::setUp();
34 
35  $this->addGlobal_lng();
36  $this->addGlobal_tpl();
38  $this->addGlobal_uiFactory();
39  $this->addGlobal_uiRenderer();
40 
41  $ctrl_mock = $this->createMock(ilCtrl::class);
42  $ctrl_mock->expects($this->any())
43  ->method("getFormAction")
44  ->willReturnCallback(function () {
45  return "testFormAction";
46  });
47 
48  $this->setGlobalVariable("ilCtrl", $ctrl_mock);
49  $component_factory = $this->createMock(ilComponentFactory::class);
50  $component_factory->method("getActivePluginsInSlot")->willReturn(new ArrayIterator());
51  $this->setGlobalVariable("component.factory", $component_factory);
52 
53  $this->parentObj_mock = $this->createMock(ilParticipantsTestResultsGUI::class);
54  $objTest_mock = $this->createMock(ilObjTest::class);
55 
56  $this->parentObj_mock
57  ->expects($this->any())
58  ->method("getTestObj")
59  ->willReturn($objTest_mock);
60 
61  $this->tableGui = new ilParticipantsTestResultsTableGUI($this->parentObj_mock, "", $DIC['ui.factory'], $DIC['ui.renderer']);
62  }
global $DIC
Definition: feed.php:28
setGlobalVariable(string $name, $value)
+ Here is the call graph for this function:

◆ test_instantiateObject_shouldReturnInstance()

ilParticipantsTestResultsTableGUITest::test_instantiateObject_shouldReturnInstance ( )

Definition at line 64 of file ilParticipantsTestResultsTableGUITest.php.

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

◆ testAccessResultsCommandsEnabled()

ilParticipantsTestResultsTableGUITest::testAccessResultsCommandsEnabled ( )

Definition at line 69 of file ilParticipantsTestResultsTableGUITest.php.

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

◆ testManageResultsCommandsEnabled()

ilParticipantsTestResultsTableGUITest::testManageResultsCommandsEnabled ( )

Definition at line 79 of file ilParticipantsTestResultsTableGUITest.php.

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

◆ testNumericOrdering()

ilParticipantsTestResultsTableGUITest::testNumericOrdering ( )

Definition at line 89 of file ilParticipantsTestResultsTableGUITest.php.

89  : void
90  {
91  $this->assertTrue($this->tableGui->numericOrdering("scored_pass"));
92  $this->assertTrue($this->tableGui->numericOrdering("answered_questions"));
93  $this->assertTrue($this->tableGui->numericOrdering("reached_points"));
94  $this->assertTrue($this->tableGui->numericOrdering("percent_result"));
95  $this->assertFalse($this->tableGui->numericOrdering("randomText"));
96  }

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: