ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilExceptionTest Class Reference

Class ilExceptionTest. More...

+ Inheritance diagram for ilExceptionTest:
+ Collaboration diagram for ilExceptionTest:

Public Member Functions

 testConstruct ()
 

Protected Member Functions

 setUp ()
 
 setGlobalVariable (string $name, $value)
 

Protected Attributes

Container $dic
 

Detailed Description

Class ilExceptionTest.

Author
Stefan Meyer smeye.nosp@m.r.il.nosp@m.ias@g.nosp@m.mx.d.nosp@m.e

Definition at line 28 of file ilExceptionTest.php.

Member Function Documentation

◆ setGlobalVariable()

ilExceptionTest::setGlobalVariable ( string  $name,
  $value 
)
protected

Definition at line 44 of file ilExceptionTest.php.

44 : 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 }
Customizing of pimple-DIC for ILIAS.
Definition: Container.php:36
$c
Definition: deliver.php:25
global $DIC
Definition: shib_login.php:26
$GLOBALS["DIC"]
Definition: wac.php:54

References $c, $DIC, and $GLOBALS.

◆ setUp()

ilExceptionTest::setUp ( )
protected

Definition at line 32 of file ilExceptionTest.php.

32 : void
33 {
34 parent::setUp();
35 }

◆ testConstruct()

ilExceptionTest::testConstruct ( )

Definition at line 37 of file ilExceptionTest.php.

37 : void
38 {
39 $exception = new ilException('My fault');
40 $this->assertInstanceOf(ilException::class, $exception);
41 $this->assertInstanceOf(Exception::class, $exception);
42 }
Base class for ILIAS Exception handling.

Field Documentation

◆ $dic

Container ilExceptionTest::$dic
protected

Definition at line 30 of file ilExceptionTest.php.


The documentation for this class was generated from the following file: