ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilTestAnswerOptionalQuestionsConfirmationGUITest.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
21use PHPUnit\Framework\MockObject\MockObject;
22
28{
29 protected MockObject $lng_mock;
30
31 protected function setUp(): void
32 {
33 parent::setUp();
34 $this->lng_mock = $this->createMock(ilLanguage::class);
35 }
36
38 {
39 $instance = new ilTestAnswerOptionalQuestionsConfirmationGUI($this->lng_mock);
40
41 $this->assertInstanceOf(ilTestAnswerOptionalQuestionsConfirmationGUI::class, $instance);
42 }
43
44 public function testGetAndSetCancelCmd(): void
45 {
46 $expect = 'testCancelCmd';
47
48 $gui = new ilTestAnswerOptionalQuestionsConfirmationGUI($this->lng_mock);
49
50 $gui->setCancelCmd($expect);
51
52 $this->assertEquals($expect, $gui->getCancelCmd());
53 }
54
55 public function testGetAndSetConfirmCmd(): void
56 {
57 $expect = 'testConfirmCmd';
58
59 $gui = new ilTestAnswerOptionalQuestionsConfirmationGUI($this->lng_mock);
60
61 $gui->setConfirmCmd($expect);
62
63 $this->assertEquals($expect, $gui->getConfirmCmd());
64 }
65}
Class ilTestBaseClass.