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

Public Member Functions

 test_instantiateObject_shouldReturnInstance ()
 
 testNumericOrdering ()
 
 testResultPresentationEnabled ()
 
 testPdfPresentationEnabled ()
 
 testObjectiveOrientedPresentationEnabled ()
 
 testActiveId ()
 
 testPassDetailsCommand ()
 
 testPassDeletionCommand ()
 

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

ilTestPassOverviewTableGUI $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 ilTestPassOverviewTableGUITest

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

Definition at line 25 of file ilTestPassOverviewTableGUITest.php.

Member Function Documentation

◆ setUp()

ilTestPassOverviewTableGUITest::setUp ( )
protected

Reimplemented from ilTestBaseTestCase.

Definition at line 30 of file ilTestPassOverviewTableGUITest.php.

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->getMockBuilder(ilObjTestGUI::class)->disableOriginalConstructor()->onlyMethods(array('getObject'))->getMock();
52 $this->parentObj_mock->expects($this->any())->method('getObject')->willReturn($this->createMock(ilObjTest::class));
53 $this->tableGui = new ilTestPassOverviewTableGUI($this->parentObj_mock, "");
54 }
setGlobalVariable(string $name, $value)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

References ilTestBaseTestCase\setGlobalVariable().

+ Here is the call graph for this function:

◆ test_instantiateObject_shouldReturnInstance()

ilTestPassOverviewTableGUITest::test_instantiateObject_shouldReturnInstance ( )

Definition at line 56 of file ilTestPassOverviewTableGUITest.php.

56 : void
57 {
58 $this->assertInstanceOf(ilTestPassOverviewTableGUI::class, $this->tableGui);
59 }

◆ testActiveId()

ilTestPassOverviewTableGUITest::testActiveId ( )

Definition at line 96 of file ilTestPassOverviewTableGUITest.php.

96 : void
97 {
98 $this->tableGui->setActiveId(20);
99 $this->assertEquals(20, $this->tableGui->getActiveId());
100 }

◆ testNumericOrdering()

ilTestPassOverviewTableGUITest::testNumericOrdering ( )

Definition at line 61 of file ilTestPassOverviewTableGUITest.php.

61 : void
62 {
63 $this->assertTrue($this->tableGui->numericOrdering("pass"));
64 $this->assertTrue($this->tableGui->numericOrdering("date"));
65 $this->assertTrue($this->tableGui->numericOrdering("percentage"));
66 $this->assertFalse($this->tableGui->numericOrdering("randomText"));
67 }

◆ testObjectiveOrientedPresentationEnabled()

ilTestPassOverviewTableGUITest::testObjectiveOrientedPresentationEnabled ( )

Definition at line 87 of file ilTestPassOverviewTableGUITest.php.

87 : void
88 {
89 $this->assertIsBool($this->tableGui->isObjectiveOrientedPresentationEnabled());
90 $this->tableGui->setObjectiveOrientedPresentationEnabled(false);
91 $this->assertFalse($this->tableGui->isObjectiveOrientedPresentationEnabled());
92 $this->tableGui->setObjectiveOrientedPresentationEnabled(true);
93 $this->assertTrue($this->tableGui->isObjectiveOrientedPresentationEnabled());
94 }

◆ testPassDeletionCommand()

ilTestPassOverviewTableGUITest::testPassDeletionCommand ( )

Definition at line 109 of file ilTestPassOverviewTableGUITest.php.

109 : void
110 {
111 $this->assertIsString($this->tableGui->getPassDeletionCommand());
112 $this->tableGui->setPassDeletionCommand("testString");
113 $this->assertEquals("testString", $this->tableGui->getPassDeletionCommand());
114 }

◆ testPassDetailsCommand()

ilTestPassOverviewTableGUITest::testPassDetailsCommand ( )

Definition at line 102 of file ilTestPassOverviewTableGUITest.php.

102 : void
103 {
104 $this->assertIsString($this->tableGui->getPassDetailsCommand());
105 $this->tableGui->setPassDetailsCommand("testString");
106 $this->assertEquals("testString", $this->tableGui->getPassDetailsCommand());
107 }

◆ testPdfPresentationEnabled()

ilTestPassOverviewTableGUITest::testPdfPresentationEnabled ( )

Definition at line 78 of file ilTestPassOverviewTableGUITest.php.

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

◆ testResultPresentationEnabled()

ilTestPassOverviewTableGUITest::testResultPresentationEnabled ( )

Definition at line 69 of file ilTestPassOverviewTableGUITest.php.

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

Field Documentation

◆ $parentObj_mock

ilObjTestGUI ilTestPassOverviewTableGUITest::$parentObj_mock
private

Definition at line 28 of file ilTestPassOverviewTableGUITest.php.

◆ $tableGui

ilTestPassOverviewTableGUI ilTestPassOverviewTableGUITest::$tableGui
private

Definition at line 27 of file ilTestPassOverviewTableGUITest.php.


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