ILIAS
release_10 Revision v10.1-43-ga1241a92c2f
◀ ilDoc Overview
CategoryReferenceTest.php
Go to the documentation of this file.
1
<?php
2
3
declare(strict_types=1);
4
5
use
PHPUnit\Framework\TestCase
;
6
12
class
CategoryReferenceTest
extends
TestCase
13
{
14
protected
function
setUp
(): void
15
{
16
$dic
=
new
ILIAS\DI\Container
();
17
$GLOBALS
[
'DIC'
] =
$dic
;
18
19
parent::setUp();
20
21
$this->
setGlobalVariable
(
22
"ilAccess"
,
23
$this->createConfiguredMock(
24
ilAccess::class,
25
[
26
"checkAccess"
=>
true
27
]
28
)
29
);
30
}
31
36
protected
function
setGlobalVariable
(
string
$name, $value): void
37
{
38
global
$DIC
;
39
40
$GLOBALS
[$name] = $value;
41
42
unset($DIC[$name]);
43
$DIC[$name] =
static
function
(
\ILIAS\DI\Container
$c
) use ($value) {
44
return
$value;
45
};
46
}
47
48
protected
function
tearDown
(): void
49
{
50
}
51
55
public
function
testCommands
(): void
56
{
57
$commands =
ilObjCategoryReferenceAccess::_getCommands
(10);
58
$this->assertIsArray($commands);
59
}
60
}
CategoryReferenceTest\setUp
setUp()
Definition:
CategoryReferenceTest.php:14
CategoryReferenceTest\setGlobalVariable
setGlobalVariable(string $name, $value)
Definition:
CategoryReferenceTest.php:36
CategoryReferenceTest
Test clipboard repository.
Definition:
CategoryReferenceTest.php:12
CategoryReferenceTest\tearDown
tearDown()
Definition:
CategoryReferenceTest.php:48
CategoryReferenceTest\testCommands
testCommands()
Test commands.
Definition:
CategoryReferenceTest.php:55
$c
$c
Definition:
deliver.php:9
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:30
$DIC
global $DIC
Definition:
shib_login.php:25
$dic
$dic
Definition:
ltiresult.php:33
TestCase
components
ILIAS
CategoryReference
tests
CategoryReferenceTest.php
Generated on Wed Sep 10 2025 15:15:10 for ILIAS by
1.8.13 (using
Doxyfile
)