ILIAS
trunk Revision v11.0_alpha-3011-gc6b235a2e85
◀ ilDoc Overview
TestCase.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
namespace
ILIAS\Tests\Refinery
;
22
23
use
ilGlobalTemplateInterface
;
24
use
ILIAS\Language\Language
;
25
use PHPUnit\Framework\TestCase as
PHPUnitTestCase
;
26
27
class
ilLanguageMock
implements
Language
28
{
30
public
array
$requested
= [];
31
public
string
$lang_module
=
'common'
;
32
public
string
$lang_key
=
'en'
;
33
34
public
function
__construct
()
35
{
36
}
37
38
public
function
txt
(
string
$a_topic,
string
$a_default_lang_fallback_mod =
''
): string
39
{
40
$this->requested[] = $a_topic;
41
return
$a_topic;
42
}
43
44
public
function
toJS
($a_lang_key, ?
ilGlobalTemplateInterface
$a_tpl =
null
): void
45
{
46
}
47
48
public
function
loadLanguageModule
(
string
$a_module): void
49
{
50
}
51
52
public
function
getLangKey
(): string
53
{
54
return
$this->lang_key
;
55
}
56
}
57
58
abstract
class
TestCase
extends
PHPUnitTestCase
59
{
60
public
function
getLanguage
():
Language
61
{
62
return
new
ilLanguageMock
();
63
}
64
}
ILIAS\Tests\Refinery\TestCase
Definition:
TestCase.php:59
ILIAS\Tests\Refinery\TestCase\getLanguage
getLanguage()
Definition:
TestCase.php:60
ILIAS\Tests\Refinery\ilLanguageMock
Definition:
TestCase.php:28
ILIAS\Tests\Refinery\ilLanguageMock\toJS
toJS($a_lang_key, ?ilGlobalTemplateInterface $a_tpl=null)
Definition:
TestCase.php:44
ILIAS\Tests\Refinery\ilLanguageMock\$lang_module
string $lang_module
Definition:
TestCase.php:31
ILIAS\Tests\Refinery\ilLanguageMock\$requested
array $requested
Definition:
TestCase.php:30
ILIAS\Tests\Refinery\ilLanguageMock\loadLanguageModule
loadLanguageModule(string $a_module)
Definition:
TestCase.php:48
ILIAS\Tests\Refinery\ilLanguageMock\$lang_key
string $lang_key
Definition:
TestCase.php:32
ILIAS\Tests\Refinery\ilLanguageMock\getLangKey
getLangKey()
Definition:
TestCase.php:52
ILIAS\Tests\Refinery\ilLanguageMock\__construct
__construct()
Definition:
TestCase.php:34
ILIAS\Tests\Refinery\ilLanguageMock\txt
txt(string $a_topic, string $a_default_lang_fallback_mod='')
Definition:
TestCase.php:38
PHPUnitTestCase
ILIAS\Language\Language
Definition:
Language.php:24
ilGlobalTemplateInterface
Definition:
interface.ilGlobalTemplateInterface.php:27
ILIAS\Tests\Refinery
Definition:
ConstantTransformationTest.php:21
components
ILIAS
Refinery
tests
TestCase.php
Generated on Sat Oct 18 2025 23:03:35 for ILIAS by
1.9.4 (using
Doxyfile
)