ILIAS  trunk Revision v11.0_alpha-1713-gd8962da2f67
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
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.

References $c, $DIC, and $GLOBALS.

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

◆ 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  }

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: