ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
assMultipleChoiceGUITest.php
Go to the documentation of this file.
1 <?php
2 
29 {
30  protected $backupGlobals = false;
31 
32  protected function setUp(): void
33  {
34  parent::setUp();
35 
36  $ilCtrl_mock = $this->getMockBuilder(ilCtrl::class)
37  ->disableOriginalConstructor()
38  ->getMock();
39  $ilCtrl_mock->method('saveParameter');
40  $ilCtrl_mock->method('saveParameterByClass');
41  $this->setGlobalVariable('ilCtrl', $ilCtrl_mock);
42 
43  $lng_mock = $this->getMockBuilder(ilLanguage::class)
44  ->disableOriginalConstructor()
45  ->onlyMethods(['txt'])
46  ->getMock();
47  $lng_mock->method('txt')->will($this->returnValue('Test'));
48  $this->setGlobalVariable('lng', $lng_mock);
49 
50  $this->setGlobalVariable('ilias', $this->getIliasMock());
51  $this->setGlobalVariable('tpl', $this->getGlobalTemplateMock());
52  $this->setGlobalVariable('ilDB', $this->getDatabaseMock());
53  }
54 
56  {
57  // Arrange
58  require_once './Modules/TestQuestionPool/classes/class.assMultipleChoiceGUI.php';
59 
60  // Act
61  $instance = new assMultipleChoiceGUI();
62 
63  $this->assertInstanceOf('assMultipleChoiceGUI', $instance);
64  }
65 }
Class assBaseTestCase.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setGlobalVariable(string $name, $value)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...