ILIAS
trunk Revision v11.0_alpha-2638-g80c1d007f79
◀ ilDoc Overview
ilExceptionTest.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
use
PHPUnit\Framework\TestCase
;
22
use
ILIAS\DI\Container
;
23
28
class
ilExceptionTest
extends
TestCase
29
{
30
protected
Container
$dic
;
31
32
protected
function
setUp
(): void
33
{
34
parent::setUp();
35
}
36
37
public
function
testConstruct
(): void
38
{
39
$exception =
new
ilException
(
'My fault'
);
40
$this->assertInstanceOf(ilException::class, $exception);
41
$this->assertInstanceOf(Exception::class, $exception);
42
}
43
44
protected
function
setGlobalVariable
(
string
$name, $value): void
45
{
46
global
$DIC
;
47
48
$GLOBALS
[$name] = $value;
49
unset($DIC[$name]);
50
$DIC[$name] =
static
function
(
\ILIAS\DI\Container
$c
) use ($value) {
51
return
$value;
52
};
53
}
54
}
ilException
ilExceptionTest\setUp
setUp()
Definition:
ilExceptionTest.php:32
$c
$c
Definition:
deliver.php:25
ILIAS\DI\Container
Customizing of pimple-DIC for ILIAS.
Definition:
Container.php:35
Container
$GLOBALS
$GLOBALS["DIC"]
Definition:
wac.php:53
ilExceptionTest\$dic
Container $dic
Definition:
ilExceptionTest.php:30
$DIC
global $DIC
Definition:
shib_login.php:26
ilExceptionTest
Class ilExceptionTest.
Definition:
ilExceptionTest.php:28
ilExceptionTest\testConstruct
testConstruct()
Definition:
ilExceptionTest.php:37
ilExceptionTest\setGlobalVariable
setGlobalVariable(string $name, $value)
Definition:
ilExceptionTest.php:44
TestCase
TestCase
components
ILIAS
Exceptions
tests
ilExceptionTest.php
Generated on Sun Aug 31 2025 23:02:50 for ILIAS by
1.8.13 (using
Doxyfile
)