ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
◀ ilDoc Overview
assErrorTextGUITest.php
Go to the documentation of this file.
1
<?
php
2
/* Copyright (c) 1998-2013 ILIAS open source, Extended GPL, see docs/LICENSE */
3
11
class
assErrorTextGUITest
extends
assBaseTestCase
12
{
13
protected
$backupGlobals
=
false
;
14
15
protected
function
setUp
()
16
{
17
if
(defined(
'ILIAS_PHPUNIT_CONTEXT'
)) {
18
include_once(
"./Services/PHPUnit/classes/class.ilUnitUtil.php"
);
19
ilUnitUtil::performInitialisation();
20
}
else
{
21
chdir(dirname(__FILE__));
22
chdir(
'../../../'
);
23
}
24
25
parent::setUp();
26
27
require_once
'./Services/UICore/classes/class.ilCtrl.php'
;
28
$ilCtrl_mock = $this->createMock(
'ilCtrl'
);
29
$ilCtrl_mock->expects($this->any())->method(
'saveParameter'
);
30
$ilCtrl_mock->expects($this->any())->method(
'saveParameterByClass'
);
31
$this->
setGlobalVariable
(
'ilCtrl'
, $ilCtrl_mock);
32
33
require_once
'./Services/Language/classes/class.ilLanguage.php'
;
34
$lng_mock = $this->createMock(
'ilLanguage'
, array(
'txt'
), array(),
''
,
false
);
35
//$lng_mock->expects( $this->once() )->method( 'txt' )->will( $this->returnValue('Test') );
36
$this->
setGlobalVariable
(
'lng'
, $lng_mock);
37
38
$this->
setGlobalVariable
(
'ilias'
, $this->
getIliasMock
());
39
$this->
setGlobalVariable
(
'tpl'
, $this->
getGlobalTemplateMock
());
40
$this->
setGlobalVariable
(
'ilDB'
, $this->
getDatabaseMock
());
41
}
42
43
public
function
test_instantiateObject_shouldReturnInstance
()
44
{
45
//$this->markTestIncomplete('Needs mock.');
46
// Arrange
47
require_once
'./Modules/TestQuestionPool/classes/class.assErrorTextGUI.php'
;
48
49
// Act
50
$instance =
new
assErrorTextGUI
();
51
52
$this->assertInstanceOf(
'assErrorTextGUI'
, $instance);
53
}
54
}
assBaseTestCase
Class assBaseTestCase.
Definition:
assBaseTestCase.php:7
assErrorTextGUITest\test_instantiateObject_shouldReturnInstance
test_instantiateObject_shouldReturnInstance()
Definition:
assErrorTextGUITest.php:43
assBaseTestCase\getGlobalTemplateMock
getGlobalTemplateMock()
Definition:
assBaseTestCase.php:36
assBaseTestCase\setGlobalVariable
setGlobalVariable($name, $value)
Definition:
assBaseTestCase.php:23
assErrorTextGUITest\$backupGlobals
$backupGlobals
Definition:
assErrorTextGUITest.php:13
assErrorTextGUI
The assErrorTextGUI class encapsulates the GUI representation for error text questions.
Definition:
class.assErrorTextGUI.php:24
php
assErrorTextGUITest\setUp
setUp()
Definition:
assErrorTextGUITest.php:15
assBaseTestCase\getIliasMock
getIliasMock()
Definition:
assBaseTestCase.php:52
assBaseTestCase\getDatabaseMock
getDatabaseMock()
Definition:
assBaseTestCase.php:44
assErrorTextGUITest
Unit tests.
Definition:
assErrorTextGUITest.php:11
Modules
TestQuestionPool
test
assErrorTextGUITest.php
Generated on Thu Feb 27 2025 19:01:50 for ILIAS by
1.8.13 (using
Doxyfile
)