ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
ilParticipantsTestResultsGUITest.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_tpl();
36  $this->addGlobal_http();
37  $this->addGlobal_refinery();
38  $this->addGlobal_ilCtrl();
39  $this->addGlobal_lng();
40  $this->addGlobal_ilUser();
41  $this->addGlobal_ilDB();
42  $this->addGlobal_ilTabs();
43  $this->addGlobal_ilToolbar();
44  $this->addGlobal_uiFactory();
45  $this->addGlobal_uiRenderer();
46 
47 
48  $this->testObj = new ilParticipantsTestResultsGUI(
49  $DIC['ilCtrl'],
50  $DIC['lng'],
51  $DIC['ilDB'],
52  $DIC['ilUser'],
53  $DIC['ilTabs'],
54  $DIC['ilToolbar'],
55  $DIC['tpl'],
56  $DIC['ui.factory'],
57  $DIC['ui.renderer'],
58  $this->createMock(ilTestParticipantAccessFilterFactory::class),
59  $this->createMock(ILIAS\Test\InternalRequestService::class),
60  $DIC['http'],
61  $DIC['refinery']
62  );
63  }
64 
66  {
67  $this->assertInstanceOf(ilParticipantsTestResultsGUI::class, $this->testObj);
68  }
69 
70  public function testTestObj(): void
71  {
72  $objTest_mock = $this->createMock(ilObjTest::class);
73 
74  $this->assertNull($this->testObj->getTestObj());
75 
76  $this->testObj->setTestObj($objTest_mock);
77  $this->assertEquals($objTest_mock, $this->testObj->getTestObj());
78  }
79 
80  public function testQuestionSetConfig(): void
81  {
82  $testQuestionSetConfig_mock = $this->createMock(ilTestQuestionSetConfig::class);
83 
84  $this->assertNull($this->testObj->getQuestionSetConfig());
85 
86  $this->testObj->setQuestionSetConfig($testQuestionSetConfig_mock);
87  $this->assertEquals($testQuestionSetConfig_mock, $this->testObj->getQuestionSetConfig());
88  }
89 
90  public function testTestAccess(): void
91  {
92  $testAccess_mock = $this->createMock(ilTestAccess::class);
93 
94  $this->assertNull($this->testObj->getTestAccess());
95 
96  $this->testObj->setTestAccess($testAccess_mock);
97  $this->assertEquals($testAccess_mock, $this->testObj->getTestAccess());
98  }
99 
100  public function testObjectiveParent(): void
101  {
102  $objectiveParent_mock = $this->createMock(ilTestObjectiveOrientedContainer::class);
103 
104  $this->assertNull($this->testObj->getObjectiveParent());
105 
106  $this->testObj->setObjectiveParent($objectiveParent_mock);
107  $this->assertEquals($objectiveParent_mock, $this->testObj->getObjectiveParent());
108  }
109 }
ilParticipantsTestResultsGUI: ilTestEvaluationGUI ilParticipantsTestResultsGUI: ilAssQuestionPageGUI...
Class ChatMainBarProvider .
Class ilParticipantsTestResultsGUITest.
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...