ILIAS
release_10 Revision v10.1-43-ga1241a92c2f
◀ ilDoc Overview
ilADTFactoryTest.php
Go to the documentation of this file.
1
<?php
2
3
declare(strict_types=1);
4
5
use
PHPUnit\Framework\TestCase
;
6
use
ILIAS\DI\Container
;
7
12
class
ilADTFactoryTest
extends
TestCase
13
{
14
protected
$backupGlobals
=
false
;
15
16
protected
Container
$dic
;
17
18
protected
function
setUp
(): void
19
{
20
$this->
initDependencies
();
21
parent::setUp();
22
}
23
24
public
function
testConstruct
(): void
25
{
26
$first =
ilADTFactory::getInstance
();
27
$second =
ilADTFactory::getInstance
();
28
$this->assertEquals($first, $second);
29
}
30
31
protected
function
setGlobalVariable
(
string
$name, $value): void
32
{
33
global
$DIC
;
34
35
$GLOBALS
[$name] = $value;
36
unset($DIC[$name]);
37
$DIC[$name] =
static
function
(
\ILIAS\DI\Container
$c
) use ($value) {
38
return
$value;
39
};
40
}
41
42
protected
function
initDependencies
(): void
43
{
44
$this->dic =
new
Container
();
45
$GLOBALS
[
'DIC'
] =
$this->dic
;
46
}
47
}
ilADTFactoryTest\testConstruct
testConstruct()
Definition:
ilADTFactoryTest.php:24
ilADTFactoryTest\initDependencies
initDependencies()
Definition:
ilADTFactoryTest.php:42
ilADTFactoryTest\$dic
Container $dic
Definition:
ilADTFactoryTest.php:16
ilADTFactory\getInstance
static getInstance()
Definition:
class.ilADTFactory.php:14
$c
$c
Definition:
deliver.php:9
ILIAS\DI\Container
Customizing of pimple-DIC for ILIAS.
Definition:
Container.php:35
ilADTFactoryTest\setGlobalVariable
setGlobalVariable(string $name, $value)
Definition:
ilADTFactoryTest.php:31
Container
$GLOBALS
$GLOBALS["DIC"]
Definition:
wac.php:30
ilADTFactoryTest\setUp
setUp()
Definition:
ilADTFactoryTest.php:18
$DIC
global $DIC
Definition:
shib_login.php:25
ilADTFactoryTest\$backupGlobals
$backupGlobals
Definition:
ilADTFactoryTest.php:14
ilADTFactoryTest
Unit tests for class ilADTFactory.
Definition:
ilADTFactoryTest.php:12
TestCase
components
ILIAS
ADT
tests
ilADTFactoryTest.php
Generated on Wed Sep 10 2025 15:14:38 for ILIAS by
1.8.13 (using
Doxyfile
)