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