ILIAS  trunk Revision v11.0_alpha-1769-g99a433fe2dc
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
assErrorTextGUITest.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  $this->setGlobalVariable('ilLog', $this->createMock(ilLogger::class));
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('ilDB', $this->getDatabaseMock());
52 
53  global $DIC;
54  $user_mock = $this->createMock('ilObjUser', [], [], '', false);
55  $DIC['ilUser'] = $user_mock;
56  $GLOBALS['ilUser'] = $user_mock;
57  }
58 
60  {
61  $instance = new assErrorTextGUI();
62 
63  $this->assertInstanceOf(assErrorTextGUI::class, $instance);
64  }
65 }
Class assBaseTestCase.
$GLOBALS["DIC"]
Definition: wac.php:53
global $DIC
Definition: shib_login.php:22
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...