ILIAS  release_8 Revision v8.24
ilTestParticipantsGUITest.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->testObj = new ilTestParticipantsGUI(
44 $this->createMock(ilObjTest::class),
45 $this->createMock(ilTestQuestionSetConfig::class)
46 );
47 }
48
49 protected function tearDown(): void
50 {
51 global $DIC;
53 }
54
56 {
57 $this->assertInstanceOf(ilTestParticipantsGUI::class, $this->testObj);
58 }
59
60 public function testTestObj(): void
61 {
62 $mock = $this->createMock(ilObjTest::class);
63 $this->testObj->setTestObj($mock);
64 $this->assertEquals($mock, $this->testObj->getTestObj());
65 }
66
67 public function testQuestionSetConfig(): void
68 {
69 $mock = $this->createMock(ilTestQuestionSetConfig::class);
70 $this->testObj->setQuestionSetConfig($mock);
71 $this->assertEquals($mock, $this->testObj->getQuestionSetConfig());
72 }
73
74 public function testObjectiveParent(): void
75 {
76 $mock = $this->createMock(ilTestObjectiveOrientedContainer::class);
77 $this->testObj->setObjectiveParent($mock);
78 $this->assertEquals($mock, $this->testObj->getObjectiveParent());
79 }
80
81 public function testTestAccess(): void
82 {
83 $mock = $this->createMock(ilTestAccess::class);
84 $this->testObj->setTestAccess($mock);
85 $this->assertEquals($mock, $this->testObj->getTestAccess());
86 }
87}
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