ILIAS  release_8 Revision v8.23
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 29 of file ilExceptionTest.php.

Member Function Documentation

◆ setGlobalVariable()

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

Definition at line 45 of file ilExceptionTest.php.

References $c, $DIC, $GLOBALS, and $name.

45  : 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  }
$c
Definition: cli.php:38
Customizing of pimple-DIC for ILIAS.
Definition: Container.php:31
global $DIC
Definition: feed.php:28
if($format !==null) $name
Definition: metadata.php:247
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
Definition: PEAR.php:64

◆ setUp()

ilExceptionTest::setUp ( )
protected

Definition at line 33 of file ilExceptionTest.php.

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

◆ testConstruct()

ilExceptionTest::testConstruct ( )

Definition at line 38 of file ilExceptionTest.php.

38  : void
39  {
40  $exception = new ilException('My fault');
41  $this->assertInstanceOf(ilException::class, $exception);
42  $this->assertInstanceOf(Exception::class, $exception);
43  }

Field Documentation

◆ $dic

Container ilExceptionTest::$dic
protected

Definition at line 31 of file ilExceptionTest.php.


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