ILIAS
trunk Revision v11.0_alpha-2638-g80c1d007f79
◀ ilDoc Overview
CategoryReferenceTest.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
use
PHPUnit\Framework\TestCase
;
22
28
class
CategoryReferenceTest
extends
TestCase
29
{
30
protected
function
setUp
(): void
31
{
32
$dic
=
new
ILIAS\DI\Container
();
33
$GLOBALS
[
'DIC'
] =
$dic
;
34
35
parent::setUp();
36
37
$this->
setGlobalVariable
(
38
"ilAccess"
,
39
$this->createConfiguredMock(
40
ilAccess::class,
41
[
42
"checkAccess"
=>
true
43
]
44
)
45
);
46
}
47
52
protected
function
setGlobalVariable
(
string
$name, $value): void
53
{
54
global
$DIC
;
55
56
$GLOBALS
[$name] = $value;
57
58
unset($DIC[$name]);
59
$DIC[$name] =
static
function
(
\ILIAS\DI\Container
$c
) use ($value) {
60
return
$value;
61
};
62
}
63
64
protected
function
tearDown
(): void
65
{
66
}
67
71
public
function
testCommands
(): void
72
{
73
$commands =
ilObjCategoryReferenceAccess::_getCommands
(10);
74
$this->assertIsArray($commands);
75
}
76
}
CategoryReferenceTest\setUp
setUp()
Definition:
CategoryReferenceTest.php:30
CategoryReferenceTest\setGlobalVariable
setGlobalVariable(string $name, $value)
Definition:
CategoryReferenceTest.php:52
CategoryReferenceTest
Test clipboard repository.
Definition:
CategoryReferenceTest.php:28
CategoryReferenceTest\tearDown
tearDown()
Definition:
CategoryReferenceTest.php:64
CategoryReferenceTest\testCommands
testCommands()
Test commands.
Definition:
CategoryReferenceTest.php:71
$c
$c
Definition:
deliver.php:25
ILIAS\DI\Container
Customizing of pimple-DIC for ILIAS.
Definition:
Container.php:35
Container
ilObjectAccess\_getCommands
static _getCommands()
get commands
Definition:
class.ilObjectAccess.php:64
$GLOBALS
$GLOBALS["DIC"]
Definition:
wac.php:53
$DIC
global $DIC
Definition:
shib_login.php:26
$dic
$dic
Definition:
result.php:31
TestCase
TestCase
components
ILIAS
CategoryReference
tests
CategoryReferenceTest.php
Generated on Sun Aug 31 2025 23:02:29 for ILIAS by
1.8.13 (using
Doxyfile
)