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

Public Member Functions

 test_instantiateObject_shouldReturnInstance ()
 
 testModalId ()
 
 testHeaderText ()
 
 testConfirmationText ()
 
 testConfirmationCheckboxName ()
 
 testConfirmationCheckboxLabel ()
 
 testAddButton ()
 
 testAddParameter ()
 
 testIsConfirmationCheckboxRequired ()
 
 testBuildModalButtonInstance ()
 

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

ilTestPlayerConfirmationModal $testObj
 

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 ilTestPlayerConfirmationModalTest

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

Definition at line 25 of file ilTestPlayerConfirmationModalTest.php.

Member Function Documentation

◆ setUp()

ilTestPlayerConfirmationModalTest::setUp ( )
protected

Reimplemented from ilTestBaseTestCase.

Definition at line 29 of file ilTestPlayerConfirmationModalTest.php.

29 : void
30 {
31 parent::setUp();
32
33 $this->testObj = new ilTestPlayerConfirmationModal();
34 }

◆ test_instantiateObject_shouldReturnInstance()

ilTestPlayerConfirmationModalTest::test_instantiateObject_shouldReturnInstance ( )

Definition at line 36 of file ilTestPlayerConfirmationModalTest.php.

36 : void
37 {
38 $this->assertInstanceOf(ilTestPlayerConfirmationModal::class, $this->testObj);
39 }

◆ testAddButton()

ilTestPlayerConfirmationModalTest::testAddButton ( )

Definition at line 71 of file ilTestPlayerConfirmationModalTest.php.

71 : void
72 {
73 $this->addGlobal_lng();
74 $expected = [];
75
76 foreach ([51, 291, 15, 681] as $id) {
77 $button = ilLinkButton::getInstance();
78 $button->setId((string) $id);
79 $expected[] = $button;
80 }
81
82 foreach ($expected as $button) {
83 $this->testObj->addButton($button);
84 }
85
86 $this->assertEquals($expected, $this->testObj->getButtons());
87 }
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23

References $id, ilTestBaseTestCase\addGlobal_lng(), and ilLinkButton\getInstance().

+ Here is the call graph for this function:

◆ testAddParameter()

ilTestPlayerConfirmationModalTest::testAddParameter ( )

Definition at line 89 of file ilTestPlayerConfirmationModalTest.php.

89 : void
90 {
91 $this->addGlobal_ilCtrl();
92
93 $this->addGlobal_lng();
94 $expected = [];
95
96 foreach ([51, 291, 15, 681] as $id) {
97 $hiddenInput = new ilHiddenInputGUI("postVar" . "_" . $id);
98 $expected[] = $hiddenInput;
99 }
100
101 foreach ($expected as $hiddenInput) {
102 $this->testObj->addParameter($hiddenInput);
103 }
104
105 $this->assertEquals($expected, $this->testObj->getParameters());
106 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

References $id, ilTestBaseTestCase\addGlobal_ilCtrl(), and ilTestBaseTestCase\addGlobal_lng().

+ Here is the call graph for this function:

◆ testBuildModalButtonInstance()

ilTestPlayerConfirmationModalTest::testBuildModalButtonInstance ( )

Definition at line 117 of file ilTestPlayerConfirmationModalTest.php.

117 : void
118 {
119 $this->addGlobal_lng();
120
121 $result = $this->testObj->buildModalButtonInstance("201");
122 $this->assertInstanceOf(ilLinkButton::class, $result);
123 $this->assertEquals("201", $result->getId());
124 }

References ilTestBaseTestCase\addGlobal_lng().

+ Here is the call graph for this function:

◆ testConfirmationCheckboxLabel()

ilTestPlayerConfirmationModalTest::testConfirmationCheckboxLabel ( )

Definition at line 65 of file ilTestPlayerConfirmationModalTest.php.

65 : void
66 {
67 $this->testObj->setConfirmationCheckboxLabel("testString");
68 $this->assertEquals("testString", $this->testObj->getConfirmationCheckboxLabel());
69 }

◆ testConfirmationCheckboxName()

ilTestPlayerConfirmationModalTest::testConfirmationCheckboxName ( )

Definition at line 59 of file ilTestPlayerConfirmationModalTest.php.

59 : void
60 {
61 $this->testObj->setConfirmationCheckboxName("testString");
62 $this->assertEquals("testString", $this->testObj->getConfirmationCheckboxName());
63 }

◆ testConfirmationText()

ilTestPlayerConfirmationModalTest::testConfirmationText ( )

Definition at line 53 of file ilTestPlayerConfirmationModalTest.php.

53 : void
54 {
55 $this->testObj->setConfirmationText("testString");
56 $this->assertEquals("testString", $this->testObj->getConfirmationText());
57 }

◆ testHeaderText()

ilTestPlayerConfirmationModalTest::testHeaderText ( )

Definition at line 47 of file ilTestPlayerConfirmationModalTest.php.

47 : void
48 {
49 $this->testObj->setHeaderText("testString");
50 $this->assertEquals("testString", $this->testObj->getHeaderText());
51 }

◆ testIsConfirmationCheckboxRequired()

ilTestPlayerConfirmationModalTest::testIsConfirmationCheckboxRequired ( )

Definition at line 108 of file ilTestPlayerConfirmationModalTest.php.

108 : void
109 {
110 $this->assertFalse($this->testObj->isConfirmationCheckboxRequired());
111
112 $this->testObj->setConfirmationCheckboxName("testName");
113 $this->testObj->setConfirmationCheckboxLabel("testLabel");
114 $this->assertTrue($this->testObj->isConfirmationCheckboxRequired());
115 }

◆ testModalId()

ilTestPlayerConfirmationModalTest::testModalId ( )

Definition at line 41 of file ilTestPlayerConfirmationModalTest.php.

41 : void
42 {
43 $this->testObj->setModalId("12345");
44 $this->assertEquals("12345", $this->testObj->getModalId());
45 }

Field Documentation

◆ $testObj

ilTestPlayerConfirmationModal ilTestPlayerConfirmationModalTest::$testObj
private

Definition at line 27 of file ilTestPlayerConfirmationModalTest.php.


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