ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
ilTestParticipantsGUITest.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
26 {
31  private $backup_dic;
32 
33  protected function setUp(): void
34  {
35  global $DIC;
36  parent::setUp();
37  $this->addGlobal_ilAccess();
38  $this->addGlobal_tpl();
39  $this->addGlobal_uiFactory();
40  $this->addGlobal_uiRenderer();
41  $this->addGlobal_lng();
42  $this->addGlobal_ilCtrl();
43  $this->addGlobal_ilTabs();
44  $this->addGlobal_ilToolbar();
45 
46  $this->testObj = new ilTestParticipantsGUI(
47  $this->createMock(ilObjTest::class),
48  $this->createMock(ilTestQuestionSetConfig::class),
49  $DIC['ilAccess'],
50  $DIC['tpl'],
51  $DIC['ui.factory'],
52  $DIC['ui.renderer'],
53  $DIC['lng'],
54  $DIC['ilCtrl'],
55  $DIC['ilDB'],
56  $DIC['ilTabs'],
57  $DIC['ilToolbar'],
58  $this->createMock(\ILIAS\Test\InternalRequestService::class)
59  );
60  }
61 
62  protected function tearDown(): void
63  {
64  global $DIC;
65  $DIC = $this->backup_dic;
66  }
67 
69  {
70  $this->assertInstanceOf(ilTestParticipantsGUI::class, $this->testObj);
71  }
72 
73  public function testTestObj(): void
74  {
75  $mock = $this->createMock(ilObjTest::class);
76  $this->testObj->setTestObj($mock);
77  $this->assertEquals($mock, $this->testObj->getTestObj());
78  }
79 
80  public function testQuestionSetConfig(): void
81  {
82  $mock = $this->createMock(ilTestQuestionSetConfig::class);
83  $this->testObj->setQuestionSetConfig($mock);
84  $this->assertEquals($mock, $this->testObj->getQuestionSetConfig());
85  }
86 
87  public function testObjectiveParent(): void
88  {
89  $mock = $this->createMock(ilTestObjectiveOrientedContainer::class);
90  $this->testObj->setObjectiveParent($mock);
91  $this->assertEquals($mock, $this->testObj->getObjectiveParent());
92  }
93 
94  public function testTestAccess(): void
95  {
96  $mock = $this->createMock(ilTestAccess::class);
97  $this->testObj->setTestAccess($mock);
98  $this->assertEquals($mock, $this->testObj->getTestAccess());
99  }
100 }
Class ChatMainBarProvider .
Class ilTestParticipantsGUITest.
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...