ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
ilTestDashboardGUITest.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
26 {
28 
29  protected function setUp(): void
30  {
31  global $DIC;
32 
33  parent::setUp();
34 
35  $this->addGlobal_ilUser();
36  $this->addGlobal_ilAccess();
37  $this->addGlobal_tpl();
38  $this->addGlobal_uiFactory();
39  $this->addGlobal_uiRenderer();
40  $this->addGlobal_lng();
41  $this->addGlobal_ilCtrl();
42  $this->addGlobal_ilTabs();
43  $this->addGlobal_ilToolbar();
44 
45  $this->testObj = new ilTestDashboardGUI(
46  $this->createMock(ilObjTest::class),
47  $DIC['ilUser'],
48  $DIC['ilAccess'],
49  $DIC['tpl'],
50  $DIC['ui.factory'],
51  $DIC['ui.renderer'],
52  $DIC['lng'],
53  $DIC['ilDB'],
54  $DIC['ilCtrl'],
55  $DIC['ilTabs'],
56  $DIC['ilToolbar'],
57  $this->createMock(ilTestQuestionSetConfig::class),
58  $this->createMock(\ILIAS\Test\InternalRequestService::class)
59  );
60  }
61 
63  {
64  $this->assertInstanceOf(ilTestDashboardGUI::class, $this->testObj);
65  }
66 
67  public function testTestObj(): void
68  {
69  $objTest_mock = $this->createMock(ilObjTest::class);
70  $this->testObj->setTestObj($objTest_mock);
71  $this->assertEquals($objTest_mock, $this->testObj->getTestObj());
72  }
73 
74  public function testQuestionSetConfig(): void
75  {
76  $testQuestionSetConfig_mock = $this->createMock(ilTestQuestionSetConfig::class);
77  $this->testObj->setQuestionSetConfig($testQuestionSetConfig_mock);
78  $this->assertEquals($testQuestionSetConfig_mock, $this->testObj->getQuestionSetConfig());
79  }
80 
81  public function testTestAccess(): void
82  {
83  $testAccess_mock = $this->createMock(ilTestAccess::class);
84  $this->testObj->setTestAccess($testAccess_mock);
85  $this->assertEquals($testAccess_mock, $this->testObj->getTestAccess());
86  }
87 
88  public function testTestTabs(): void
89  {
90  $testTabsManager_mock = $this->createMock(ilTestTabsManager::class);
91  $this->testObj->setTestTabs($testTabsManager_mock);
92  $this->assertEquals($testTabsManager_mock, $this->testObj->getTestTabs());
93  }
94 
95  public function testObjectiveParent(): void
96  {
97  $objectiveParent_mock = $this->createMock(ilTestObjectiveOrientedContainer::class);
98  $this->testObj->setObjectiveParent($objectiveParent_mock);
99  $this->assertEquals($objectiveParent_mock, $this->testObj->getObjectiveParent());
100  }
101 }
Class ChatMainBarProvider .
Class ilTestDashboardGUITest.
global $DIC
Definition: feed.php:28
Class ilTestBaseClass.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...