ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
ilTestResultsGUITest.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  parent::setUp();
33 
34  $this->addGlobal_ilCtrl();
35  $this->addGlobal_ilAccess();
36  $this->addGlobal_ilUser();
37  $this->addGlobal_lng();
40  $this->addGlobal_ilTabs();
41  $this->addGlobal_ilToolbar();
42  $this->addGlobal_tpl();
43  $this->addGlobal_uiFactory();
44  $this->addGlobal_uiRenderer();
45  $this->addGlobal_http();
46 
47  $this->testObj = new ilTestResultsGUI(
48  $this->createMock(ilObjTest::class),
49  $this->createMock(ilTestQuestionSetConfig::class),
50  $DIC['ilCtrl'],
51  $DIC['ilAccess'],
52  $DIC['ilDB'],
53  $DIC['refinery'],
54  $DIC['ilUser'],
55  $DIC['lng'],
56  $this->createMock(\ILIAS\DI\LoggingServices::class),
57  $DIC['component.repository'],
58  $DIC['ilTabs'],
59  $DIC['ilToolbar'],
60  $DIC['tpl'],
61  $DIC['ui.factory'],
62  $DIC['ui.renderer'],
63  $this->createMock(ILIAS\Skill\Service\SkillService::class),
64  $this->createMock(ILIAS\Test\InternalRequestService::class),
65  $this->createMock(\ILIAS\TestQuestionPool\QuestionInfoService::class),
66  $DIC['http']
67  );
68  }
69 
71  {
72  $this->assertInstanceOf(ilTestResultsGUI::class, $this->testObj);
73  }
74 
75  public function testObjectiveParent(): void
76  {
77  $mock = $this->createMock(ilTestObjectiveOrientedContainer::class);
78  $this->testObj->setObjectiveParent($mock);
79  $this->assertEquals($mock, $this->testObj->getObjectiveParent());
80  }
81 
82  public function testTestObj(): void
83  {
84  $mock = $this->createMock(ilObjTest::class);
85  $this->testObj->setTestObj($mock);
86  $this->assertEquals($mock, $this->testObj->getTestObj());
87  }
88 
89  public function testQuestionSetConfig(): void
90  {
91  $mock = $this->createMock(ilTestQuestionSetConfig::class);
92  $this->testObj->setQuestionSetConfig($mock);
93  $this->assertEquals($mock, $this->testObj->getQuestionSetConfig());
94  }
95 
96  public function testTestAccess(): void
97  {
98  $mock = $this->createMock(ilTestAccess::class);
99  $this->testObj->setTestAccess($mock);
100  $this->assertEquals($mock, $this->testObj->getTestAccess());
101  }
102 
103  public function testTestSession(): void
104  {
105  $mock = $this->createMock(ilTestSession::class);
106  $this->testObj->setTestSession($mock);
107  $this->assertEquals($mock, $this->testObj->getTestSession());
108  }
109 
110  public function testTestTabs(): void
111  {
112  $mock = $this->createMock(ilTestTabsManager::class);
113  $this->testObj->setTestTabs($mock);
114  $this->assertEquals($mock, $this->testObj->getTestTabs());
115  }
116 }
Class ChatMainBarProvider .
Class ilTestResultsGUITest.
global $DIC
Definition: feed.php:28
Class HTTPServicesTest.
Class ilTestBaseClass.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...