ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
◀ 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
PHPUnit_Framework_TestCase
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
require_once
'./Services/UICore/classes/class.ilCtrl.php'
;
26
$ilCtrl_mock = $this->createMock(
'ilCtrl'
);
27
$ilCtrl_mock->expects($this->any())->method(
'saveParameter'
);
28
$ilCtrl_mock->expects($this->any())->method(
'saveParameterByClass'
);
29
global
$ilCtrl
;
30
$ilCtrl = $ilCtrl_mock;
31
32
require_once
'./Services/Language/classes/class.ilLanguage.php'
;
33
$lng_mock = $this->createMock(
'ilLanguage'
,
array
(
'txt'
),
array
(),
''
,
false
);
34
//$lng_mock->expects( $this->once() )->method( 'txt' )->will( $this->returnValue('Test') );
35
global
$lng
;
36
$lng = $lng_mock;
37
38
$ilias_mock =
new
stdClass();
39
$ilias_mock->account =
new
stdClass();
40
$ilias_mock->account->id = 6;
41
$ilias_mock->account->fullname =
'Esther Tester'
;
42
global $ilias;
43
$ilias = $ilias_mock;
44
}
45
46
public
function
test_instantiateObject_shouldReturnInstance
()
47
{
48
//$this->markTestIncomplete('Needs mock.');
49
// Arrange
50
require_once
'./Modules/TestQuestionPool/classes/class.assErrorTextGUI.php'
;
51
52
// Act
53
$instance =
new
assErrorTextGUI
();
54
55
$this->assertInstanceOf(
'assErrorTextGUI'
, $instance);
56
}
57
}
PHPUnit_Framework_TestCase
assErrorTextGUITest\test_instantiateObject_shouldReturnInstance
test_instantiateObject_shouldReturnInstance()
Definition:
assErrorTextGUITest.php:46
$ilCtrl
global $ilCtrl
Definition:
ilias.php:18
assErrorTextGUITest\$backupGlobals
$backupGlobals
Definition:
assErrorTextGUITest.php:13
assErrorTextGUI
The assErrorTextGUI class encapsulates the GUI representation for error text questions.
Definition:
class.assErrorTextGUI.php:24
array
Create styles array
The data for the language used.
Definition:
40duplicateStyle.php:19
$lng
global $lng
Definition:
privfeed.php:17
assErrorTextGUITest\setUp
setUp()
Definition:
assErrorTextGUITest.php:15
defined
defined( 'APPLICATION_ENV')||define( 'APPLICATION_ENV'
Definition:
bootstrap.php:27
assErrorTextGUITest
Unit tests.
Definition:
assErrorTextGUITest.php:11
Modules
TestQuestionPool
test
assErrorTextGUITest.php
Generated on Sat Mar 1 2025 19:01:25 for ILIAS by
1.8.13 (using
Doxyfile
)