ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ILIAS\Test\Tests\Presentation\TabsManagerTest Class Reference
+ Inheritance diagram for ILIAS\Test\Tests\Presentation\TabsManagerTest:
+ Collaboration diagram for ILIAS\Test\Tests\Presentation\TabsManagerTest:

Public Member Functions

 test_instantiateObject_shouldReturnInstance ()
 
 testActivateTab ()
 
 testActivateSubTab ()
 
 testParentBackLabel ()
 
 testParentBackHref ()
 
 testHasParentBackLink ()
 
- Public Member Functions inherited from ilTestBaseTestCase
 createInstanceOf (string $class_name, array $explicit_parameters=[])
 
 createTraitInstanceOf (string $class_name, array $explicit_parameters=[])
 

Protected Member Functions

 setUp ()
 
- Protected Member Functions inherited from ilTestBaseTestCase
 setUp ()
 
 tearDown ()
 

Private Attributes

TabsManager $testObj
 

Additional Inherited Members

- Static Public Member Functions inherited from ilTestBaseTestCase
static callMethod ($obj, $name, array $args=[])
 
static getNonPublicPropertyValue (object $obj, string $name)
 
- Data Fields inherited from ilTestBaseTestCase
const string MOCKED_METHOD_WITHOUT_OUTPUT = 'MOCKED_METHOD_WITHOUT_OUTPUT'
 
const string DYNAMIC_CLASS = 'DynamicClass'
 
- Protected Attributes inherited from ilTestBaseTestCase
Container $dic = null
 
Container $backup_dic = null
 
- Static Protected Attributes inherited from ilTestBaseTestCase
static int $DYNAMIC_CLASS_COUNT = 0
 

Detailed Description

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

Definition at line 30 of file TabsManagerTest.php.

Member Function Documentation

◆ setUp()

ILIAS\Test\Tests\Presentation\TabsManagerTest::setUp ( )
protected

Reimplemented from ilTestBaseTestCase.

Definition at line 34 of file TabsManagerTest.php.

34 : void
35 {
36 global $DIC;
37 parent::setUp();
38
39 $this->addGlobal_ilTabs();
40
41 $this->testObj = new TabsManager(
42 $DIC['ilTabs'],
43 $this->createMock(\ilLanguage::class),
44 $this->createMock(\ilCtrl::class),
45 $this->createMock(\ilAccess::class),
46 $this->createMock(\ilTestAccess::class),
47 $this->getTestObjMock(),
48 $this->createMock(\ilTestObjectiveOrientedContainer::class),
49 $this->createMock(\ilTestSession::class)
50 );
51 }
global $DIC
Definition: shib_login.php:26

References $DIC, addGlobal_ilTabs(), and getTestObjMock().

+ Here is the call graph for this function:

◆ test_instantiateObject_shouldReturnInstance()

ILIAS\Test\Tests\Presentation\TabsManagerTest::test_instantiateObject_shouldReturnInstance ( )

Definition at line 53 of file TabsManagerTest.php.

53 : void
54 {
55 $this->assertInstanceOf(TabsManager::class, $this->testObj);
56 }

◆ testActivateSubTab()

ILIAS\Test\Tests\Presentation\TabsManagerTest::testActivateSubTab ( )

Definition at line 67 of file TabsManagerTest.php.

67 : void
68 {
69 global $DIC;
70 $DIC['ilTabs']->expects($this->exactly(7))->method('activateSubTab');
71
72 $this->testObj->activateSubTab(TabsManager::SUBTAB_ID_MY_RESULTS);
73 $this->testObj->activateSubTab(TabsManager::SUBTAB_ID_LO_RESULTS);
74 $this->testObj->activateSubTab(TabsManager::SUBTAB_ID_HIGHSCORE);
75 $this->testObj->activateSubTab(TabsManager::SUBTAB_ID_SKILL_RESULTS);
76 $this->testObj->activateSubTab(TabsManager::SUBTAB_ID_MY_SOLUTIONS);
77 $this->testObj->activateSubTab(TabsManager::SUBTAB_ID_QST_LIST_VIEW);
78 $this->testObj->activateSubTab(TabsManager::SUBTAB_ID_QST_PAGE_VIEW);
79 $this->testObj->activateSubTab('randomString');
80 }

References $DIC, ILIAS\Test\Presentation\TabsManager\SUBTAB_ID_HIGHSCORE, ILIAS\Test\Presentation\TabsManager\SUBTAB_ID_LO_RESULTS, ILIAS\Test\Presentation\TabsManager\SUBTAB_ID_MY_RESULTS, ILIAS\Test\Presentation\TabsManager\SUBTAB_ID_MY_SOLUTIONS, ILIAS\Test\Presentation\TabsManager\SUBTAB_ID_QST_LIST_VIEW, ILIAS\Test\Presentation\TabsManager\SUBTAB_ID_QST_PAGE_VIEW, and ILIAS\Test\Presentation\TabsManager\SUBTAB_ID_SKILL_RESULTS.

◆ testActivateTab()

ILIAS\Test\Tests\Presentation\TabsManagerTest::testActivateTab ( )

Definition at line 58 of file TabsManagerTest.php.

58 : void
59 {
60 global $DIC;
61 $DIC['ilTabs']->expects($this->exactly(2))->method('activateTab');
62 $this->testObj->activateTab(TabsManager::TAB_ID_PARTICIPANTS);
63 $this->testObj->activateTab(TabsManager::TAB_ID_YOUR_RESULTS);
64 $this->testObj->activateTab('randomString');
65 }

References $DIC, ILIAS\Test\Presentation\TabsManager\TAB_ID_PARTICIPANTS, and ILIAS\Test\Presentation\TabsManager\TAB_ID_YOUR_RESULTS.

◆ testHasParentBackLink()

ILIAS\Test\Tests\Presentation\TabsManagerTest::testHasParentBackLink ( )

Definition at line 96 of file TabsManagerTest.php.

96 : void
97 {
98 $this->assertFalse($this->testObj->hasParentBackLink());
99 $parent_back_x = 'Test';
100
101 $this->testObj->setParentBackHref($parent_back_x);
102 $this->assertFalse($this->testObj->hasParentBackLink());
103
104 $this->testObj->setParentBackLabel($parent_back_x);
105 $this->assertTrue($this->testObj->hasParentBackLink());
106 }

◆ testParentBackHref()

ILIAS\Test\Tests\Presentation\TabsManagerTest::testParentBackHref ( )

Definition at line 89 of file TabsManagerTest.php.

89 : void
90 {
91 $parent_back_href = 'Test';
92 $this->testObj->setParentBackHref($parent_back_href);
93 $this->assertEquals($parent_back_href, $this->testObj->getParentBackHref());
94 }

◆ testParentBackLabel()

ILIAS\Test\Tests\Presentation\TabsManagerTest::testParentBackLabel ( )

Definition at line 82 of file TabsManagerTest.php.

82 : void
83 {
84 $parent_back_label = 'Test';
85 $this->testObj->setParentBackLabel($parent_back_label);
86 $this->assertEquals($parent_back_label, $this->testObj->getParentBackLabel());
87 }

Field Documentation

◆ $testObj

TabsManager ILIAS\Test\Tests\Presentation\TabsManagerTest::$testObj
private

Definition at line 32 of file TabsManagerTest.php.


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