ILIAS  release_8 Revision v8.24
ilTestResultsGUITest.php
Go to the documentation of this file.
1<?php
2
3declare(strict_types=1);
4
26{
31 private $backup_dic;
32
33 protected function setUp(): void
34 {
35 parent::setUp();
36 global $DIC;
37
38 $this->backup_dic = $DIC;
40 'tpl' => $this->getMockBuilder(ilGlobalTemplateInterface::class)
41 ->getMock()
42 ]);
43 $this->addGlobal_lng();
44
45 $this->testObj = new ilTestResultsGUI(
46 $this->createMock(ilObjTest::class),
47 $this->createMock(ilTestQuestionSetConfig::class)
48 );
49 }
50
51 protected function tearDown(): void
52 {
53 global $DIC;
55 }
56
58 {
59 $this->assertInstanceOf(ilTestResultsGUI::class, $this->testObj);
60 }
61
62 public function testObjectiveParent(): void
63 {
64 $mock = $this->createMock(ilTestObjectiveOrientedContainer::class);
65 $this->testObj->setObjectiveParent($mock);
66 $this->assertEquals($mock, $this->testObj->getObjectiveParent());
67 }
68
69 public function testTestObj(): void
70 {
71 $mock = $this->createMock(ilObjTest::class);
72 $this->testObj->setTestObj($mock);
73 $this->assertEquals($mock, $this->testObj->getTestObj());
74 }
75
76 public function testQuestionSetConfig(): void
77 {
78 $mock = $this->createMock(ilTestQuestionSetConfig::class);
79 $this->testObj->setQuestionSetConfig($mock);
80 $this->assertEquals($mock, $this->testObj->getQuestionSetConfig());
81 }
82
83 public function testTestAccess(): void
84 {
85 $mock = $this->createMock(ilTestAccess::class);
86 $this->testObj->setTestAccess($mock);
87 $this->assertEquals($mock, $this->testObj->getTestAccess());
88 }
89
90 public function testTestSession(): void
91 {
92 $mock = $this->createMock(ilTestSession::class);
93 $this->testObj->setTestSession($mock);
94 $this->assertEquals($mock, $this->testObj->getTestSession());
95 }
96
97 public function testTestTabs(): void
98 {
99 $mock = $this->createMock(ilTestTabsManager::class);
100 $this->testObj->setTestTabs($mock);
101 $this->assertEquals($mock, $this->testObj->getTestTabs());
102 }
103}
Customizing of pimple-DIC for ILIAS.
Definition: Container.php:32
Class ilTestBaseClass.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
global $DIC
Definition: feed.php:28