ILIAS  release_8 Revision v8.24
ilTestRandomQuestionSetConfigStateMessageHandlerTest.php
Go to the documentation of this file.
1<?php
2
3declare(strict_types=1);
4
26{
28
29 protected function setUp(): void
30 {
31 parent::setUp();
32 $this->addGlobal_ilUser();
33
35 $this->createMock(ilLanguage::class),
36 $this->createMock(ILIAS\DI\UIServices::class),
37 $this->createMock(ilCtrl::class)
38 );
39 }
40
42 {
43 $this->assertInstanceOf(ilTestRandomQuestionSetConfigStateMessageHandler::class, $this->testObj);
44 }
45
46 public function testLostPools(): void
47 {
48 $expected = [
52 ];
53
54 $this->testObj->setLostPools($expected);
55 $this->assertEquals($expected, $this->testObj->getLostPools());
56 }
57
58 public function testParticipantDataExists(): void
59 {
60 $this->testObj->setParticipantDataExists(false);
61 $this->assertFalse($this->testObj->doesParticipantDataExists());
62
63 $this->testObj->setParticipantDataExists(true);
64 $this->assertTrue($this->testObj->doesParticipantDataExists());
65 }
66
67 public function testTargetGUI(): void
68 {
69 $targetGui_mock = $this->createMock(ilTestRandomQuestionSetConfigGUI::class);
70 $this->testObj->setTargetGUI($targetGui_mock);
71 $this->assertEquals($targetGui_mock, $this->testObj->getTargetGUI());
72 }
73
74 public function testContext(): void
75 {
76 $this->testObj->setContext("test");
77 $this->assertEquals("test", $this->testObj->getContext());
78 }
79
80 public function testQuestionSetConfig(): void
81 {
82 $mock = $this->createMock(ilTestRandomQuestionSetConfig::class);
83 $this->testObj->setQuestionSetConfig($mock);
84 $this->assertEquals($mock, $this->testObj->getQuestionSetConfig());
85 }
86}
Class ilTestBaseClass.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Class HTTPServicesTest.
Class ChatMainBarProvider \MainMenu\Provider.