ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilTestRandomQuestionSetConfigStateMessageHandlerTest.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
26{
28
29 protected function setUp(): void
30 {
31 global $DIC;
32 parent::setUp();
33
35 $DIC['lng'],
36 $DIC['ui.factory'],
37 $DIC['ui.renderer'],
38 $DIC['ilCtrl']
39 );
40 }
41
43 {
44 $this->assertInstanceOf(ilTestRandomQuestionSetConfigStateMessageHandler::class, $this->testObj);
45 }
46
47 public function testLostPools(): void
48 {
49 $expected = [
53 ];
54
55 $this->testObj->setLostPools($expected);
56 $this->assertEquals($expected, $this->testObj->getLostPools());
57 }
58
59 public function testParticipantDataExists(): void
60 {
61 $this->testObj->setParticipantDataExists(false);
62 $this->assertFalse($this->testObj->doesParticipantDataExists());
63
64 $this->testObj->setParticipantDataExists(true);
65 $this->assertTrue($this->testObj->doesParticipantDataExists());
66 }
67
68 public function testTargetGUI(): void
69 {
70 $targetGui_mock = $this->createMock(ilTestRandomQuestionSetConfigGUI::class);
71 $this->testObj->setTargetGUI($targetGui_mock);
72 $this->assertEquals($targetGui_mock, $this->testObj->getTargetGUI());
73 }
74
75 public function testContext(): void
76 {
77 $context = 'test';
78 $this->testObj->setContext($context);
79 $this->assertEquals($context, $this->testObj->getContext());
80 }
81
82 public function testQuestionSetConfig(): void
83 {
84 $mock = $this->createMock(ilTestRandomQuestionSetConfig::class);
85 $this->testObj->setQuestionSetConfig($mock);
86 $this->assertEquals($mock, $this->testObj->getQuestionSetConfig());
87 }
88}
Class ilTestBaseClass.
global $DIC
Definition: shib_login.php:26
$context
Definition: webdav.php:31