ILIAS  release_8 Revision v8.24
ilCASSettingsTest Class Reference
+ Inheritance diagram for ilCASSettingsTest:
+ Collaboration diagram for ilCASSettingsTest:

Protected Member Functions

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

Detailed Description

Definition at line 24 of file ilCASSettingsTest.php.

Member Function Documentation

◆ setGlobalVariable()

ilCASSettingsTest::setGlobalVariable ( string  $name,
  $value 
)
protected
Parameters
string$name
mixed$value

Definition at line 41 of file ilCASSettingsTest.php.

41 : void
42 {
43 global $DIC;
44
45 $GLOBALS[$name] = $value;
46
47 unset($DIC[$name]);
48 $DIC[$name] = static function ($c) use ($name) {
49 return $GLOBALS[$name];
50 };
51 }
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
Definition: PEAR.php:64
$c
Definition: cli.php:38
global $DIC
Definition: feed.php:28
if($format !==null) $name
Definition: metadata.php:247

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

Referenced by setUp().

+ Here is the caller graph for this function:

◆ setUp()

ilCASSettingsTest::setUp ( )
protected

Definition at line 26 of file ilCASSettingsTest.php.

26 : void
27 {
28 $this->dic = new Container();
29 $GLOBALS['DIC'] = $this->dic;
30 $this->setGlobalVariable(
31 'ilSetting',
32 $this->getMockBuilder(ilSetting::class)->disableOriginalConstructor()->getMock()
33 );
34 parent::setUp();
35 }
Customizing of pimple-DIC for ILIAS.
Definition: Container.php:32
setGlobalVariable(string $name, $value)
$dic
Definition: result.php:32

References $dic, $GLOBALS, and setGlobalVariable().

+ Here is the call graph for this function:

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