ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
assSingleChoiceGUITest.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('tpl', $this->getGlobalTemplateMock());
54  $this->setGlobalVariable('ilDB', $this->getDatabaseMock());
55  }
56 
58  {
59  // Act
60  $instance = new assSingleChoiceGUI();
61 
62  $this->assertInstanceOf('assSingleChoiceGUI', $instance);
63  }
64 }
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...
setGlobalVariable(string $name, $value)