ILIAS
trunk Revision v11.0_alpha-2638-g80c1d007f79
◀ ilDoc Overview
assTextQuestionTest.php
Go to the documentation of this file.
1
<?php
2
26
class
assTextQuestionTest
extends
assBaseTestCase
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'
)->willReturn(
'Test'
);
46
$this->
setGlobalVariable
(
'lng'
, $lng_mock);
47
48
$this->
setGlobalVariable
(
'ilias'
, $this->
getIliasMock
());
49
$this->
setGlobalVariable
(
'ilDB'
, $this->
getDatabaseMock
());
50
}
51
52
public
function
test_instantiateObject_shouldReturnInstance
(): void
53
{
54
$instance =
new
assTextQuestion
();
55
56
$this->assertInstanceOf(assTextQuestion::class, $instance);
57
}
58
}
assTextQuestionTest\test_instantiateObject_shouldReturnInstance
test_instantiateObject_shouldReturnInstance()
Definition:
assTextQuestionTest.php:52
assBaseTestCase
Class assBaseTestCase.
Definition:
assBaseTestCase.php:26
getIliasMock
getIliasMock()
Definition:
ilTestBaseTestCaseTrait.php:160
getDatabaseMock
getDatabaseMock()
Definition:
ilTestBaseTestCaseTrait.php:152
assTextQuestion
Class for text questions.
Definition:
class.assTextQuestion.php:38
assTextQuestionTest\setUp
setUp()
Definition:
assTextQuestionTest.php:30
assTextQuestionTest\$backupGlobals
$backupGlobals
Definition:
assTextQuestionTest.php:28
assTextQuestionTest
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition:
assTextQuestionTest.php:26
setGlobalVariable
setGlobalVariable(string $name, mixed $value)
Definition:
ilTestBaseTestCaseTrait.php:129
components
ILIAS
TestQuestionPool
tests
assTextQuestionTest.php
Generated on Sun Aug 31 2025 23:04:05 for ILIAS by
1.8.13 (using
Doxyfile
)