ILIAS
release_9 Revision v9.13-25-g2c18ec4c24f
◀ ilDoc Overview
ilCertificateBaseTestCase.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
use
ILIAS\DI\Container
;
22
use
PHPUnit\Framework\TestCase
;
23
use
ILIAS\LegalDocuments\Conductor
;
24
29
abstract
class
ilCertificateBaseTestCase
extends
TestCase
30
{
31
protected
function
setUp
(): void
32
{
33
if
(!defined(
'ANONYMOUS_USER_ID'
)) {
34
define(
'ANONYMOUS_USER_ID'
, 13);
35
}
36
37
global
$DIC
;
38
39
$this->dic = is_object($DIC) ? clone
$DIC
:
$DIC
;
40
41
$DIC =
new
Container
();
42
43
parent::setUp();
44
}
45
46
protected
function
setGlobalVariable
(
string
$name, $value): void
47
{
48
global
$DIC
;
49
50
$GLOBALS
[$name] = $value;
51
52
unset($DIC[$name]);
53
$DIC[$name] =
static
function
(
Container
$c
) use ($name) {
54
return
$GLOBALS
[$name];
55
};
56
}
57
}
ILIAS\DI\Container
Customizing of pimple-DIC for ILIAS.
Definition:
Container.php:35
ilCertificateBaseTestCase
Class ilCertificateBaseTestCase.
Definition:
ilCertificateBaseTestCase.php:29
$DIC
global $DIC
Definition:
feed.php:28
Container
$GLOBALS
$GLOBALS["DIC"]
Definition:
wac.php:31
Conductor
ilCertificateBaseTestCase\setUp
setUp()
Definition:
ilCertificateBaseTestCase.php:31
Vendor\Package\$c
$c
Definition:
example_cleaned.php:49
ilCertificateBaseTestCase\setGlobalVariable
setGlobalVariable(string $name, $value)
Definition:
ilCertificateBaseTestCase.php:46
TestCase
Services
Certificate
test
ilCertificateBaseTestCase.php
Generated on Wed Sep 10 2025 14:11:20 for ILIAS by
1.8.13 (using
Doxyfile
)