ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
ilCASSettingsTest Class Reference
+ Inheritance diagram for ilCASSettingsTest:
+ Collaboration diagram for ilCASSettingsTest:

Protected Member Functions

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

Protected Attributes

Container $dic
 

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 43 of file ilCASSettingsTest.php.

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

Referenced by setUp().

43  : void
44  {
45  global $DIC;
46 
47  $GLOBALS[$name] = $value;
48 
49  unset($DIC[$name]);
50  $DIC[$name] = static function ($c) use ($name) {
51  return $GLOBALS[$name];
52  };
53  }
global $DIC
Definition: feed.php:28
$GLOBALS["DIC"]
Definition: wac.php:31
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setUp()

ilCASSettingsTest::setUp ( )
protected

Definition at line 28 of file ilCASSettingsTest.php.

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

28  : void
29  {
30  $this->dic = new Container();
31  $GLOBALS['DIC'] = $this->dic;
32  $this->setGlobalVariable(
33  'ilSetting',
34  $this->getMockBuilder(ilSetting::class)->disableOriginalConstructor()->getMock()
35  );
36  parent::setUp();
37  }
Customizing of pimple-DIC for ILIAS.
Definition: Container.php:35
setGlobalVariable(string $name, $value)
$GLOBALS["DIC"]
Definition: wac.php:31
+ Here is the call graph for this function:

Field Documentation

◆ $dic

Container ilCASSettingsTest::$dic
protected

Definition at line 26 of file ilCASSettingsTest.php.

Referenced by setUp().


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