ILIAS  trunk Revision v11.0_alpha-1723-g8e69f309bab
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator 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  $this->setGlobalVariable('ilLog', $this->createMock(ilLogger::class));
37 
38  $ilCtrl_mock = $this->getMockBuilder(ilCtrl::class)
39  ->disableOriginalConstructor()
40  ->getMock();
41  $ilCtrl_mock->method('saveParameter');
42  $ilCtrl_mock->method('saveParameterByClass');
43  $this->setGlobalVariable('ilCtrl', $ilCtrl_mock);
44 
45  $lng_mock = $this->getMockBuilder(ilLanguage::class)
46  ->disableOriginalConstructor()
47  ->onlyMethods(['txt'])
48  ->getMock();
49  $lng_mock->method('txt')->will($this->returnValue('Test'));
50  $this->setGlobalVariable('lng', $lng_mock);
51 
52  $this->setGlobalVariable('ilias', $this->getIliasMock());
53  $this->setGlobalVariable('ilDB', $this->getDatabaseMock());
54  }
55 
57  {
58  $instance = new assMultipleChoiceGUI();
59 
60  $this->assertInstanceOf(assMultipleChoiceGUI::class, $instance);
61  }
62 }
Class assBaseTestCase.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...