ILIAS  release_8 Revision v8.23
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  $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  $this->setGlobalVariable('ilias', $this->getIliasMock());
49  $this->setGlobalVariable('tpl', $this->getGlobalTemplateMock());
50  $this->setGlobalVariable('ilDB', $this->getDatabaseMock());
51 
52  global $DIC;
53  $user_mock = $this->createMock('ilObjUser', array(), array(), '', false);
54  $DIC['ilUser'] = $user_mock;
55  $GLOBALS['ilUser'] = $user_mock;
56  }
57 
59  {
60  //$this->markTestIncomplete('Needs mock.');
61  // Arrange
62  require_once './Modules/TestQuestionPool/classes/class.assErrorTextGUI.php';
63 
64  // Act
65  $instance = new assErrorTextGUI();
66 
67  $this->assertInstanceOf('assErrorTextGUI', $instance);
68  }
69 }
Class assBaseTestCase.
global $DIC
Definition: feed.php:28
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
Definition: PEAR.php:64
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...