ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
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.

References $c, $DIC, $GLOBALS, $name, and ilCASSettings\getInstance().

Referenced by setUp().

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  }
$c
Definition: cli.php:38
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
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setUp()

ilCASSettingsTest::setUp ( )
protected

Definition at line 26 of file ilCASSettingsTest.php.

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

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:31
setGlobalVariable(string $name, $value)
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
Definition: PEAR.php:64
$dic
Definition: result.php:32
+ Here is the call graph for this function:

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