ILIAS  release_8 Revision v8.24
assClozeTestGUITest.php
Go to the documentation of this file.
1<?php
2
27{
28 protected $backupGlobals = false;
29
30 protected function setUp(): void
31 {
32 parent::setUp();
33
34 $ilCtrl_mock = $this->getMockBuilder(ilCtrl::class)
35 ->disableOriginalConstructor()
36 ->getMock();
37 $ilCtrl_mock->method('saveParameter');
38 $ilCtrl_mock->method('saveParameterByClass');
39 $this->setGlobalVariable('ilCtrl', $ilCtrl_mock);
40
41 $lng_mock = $this->getMockBuilder(ilLanguage::class)
42 ->disableOriginalConstructor()
43 ->onlyMethods(['txt'])
44 ->getMock();
45 $lng_mock->method('txt')->will($this->returnValue('Test'));
46 $this->setGlobalVariable('lng', $lng_mock);
47
48 $ilias_mock = new stdClass();
49 $ilias_mock->account = new stdClass();
50 $ilias_mock->account->id = 6;
51 $ilias_mock->account->fullname = 'Esther Tester';
52
53 $this->setGlobalVariable('ilias', $ilias_mock);
54 $this->setGlobalVariable('tpl', $this->getGlobalTemplateMock());
55 }
56
58 {
63 //$this->markTestIncomplete('Needs mock ilCtrl.');
64 // Arrange
65 require_once './Modules/TestQuestionPool/classes/class.assClozeTestGUI.php';
66
67
68
69 // Act
70 $instance = new assClozeTestGUI();
71
72 $this->assertInstanceOf('assClozeTestGUI', $instance);
73 }
74}
Class assBaseTestCase.
setGlobalVariable(string $name, $value)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Cloze test question GUI representation.