ILIAS  release_8 Revision v8.24
ilTestQuestionSideListGUITest.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
33 $this->testObj = new ilTestQuestionSideListGUI(
34 $this->createMock(ilCtrl::class),
35 $this->createMock(ilLanguage::class)
36 );
37 }
38
40 {
41 $this->assertInstanceOf(ilTestQuestionSideListGUI::class, $this->testObj);
42 }
43
44 public function testTargetGUI(): void
45 {
46 $targetGui_mock = $this->createMock(ilTestPlayerAbstractGUI::class);
47 $this->testObj->setTargetGUI($targetGui_mock);
48 $this->assertEquals($targetGui_mock, $this->testObj->getTargetGUI());
49 }
50
51 public function testQuestionSummaryData(): void
52 {
53 $expected = [
54 "test" => "Hello",
55 ];
56 $this->testObj->setQuestionSummaryData($expected);
57 $this->assertEquals($expected, $this->testObj->getQuestionSummaryData());
58 }
59
60 public function testCurrentSequenceElement(): void
61 {
62 $this->testObj->setCurrentSequenceElement(125);
63 $this->assertEquals(125, $this->testObj->getCurrentSequenceElement());
64 }
65
66 public function testCurrentPresentationMode(): void
67 {
68 $this->testObj->setCurrentPresentationMode("test");
69 $this->assertEquals("test", $this->testObj->getCurrentPresentationMode());
70 }
71
72 public function testDisabled(): void
73 {
74 $this->testObj->setDisabled(false);
75 $this->assertFalse($this->testObj->isDisabled());
76
77 $this->testObj->setDisabled(true);
78 $this->assertTrue($this->testObj->isDisabled());
79 }
80}
Class ilTestBaseClass.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...