ILIAS  release_10 Revision v10.1-43-ga1241a92c2f
ilADTFactoryTest Class Reference

Unit tests for class ilADTFactory. More...

+ Inheritance diagram for ilADTFactoryTest:
+ Collaboration diagram for ilADTFactoryTest:

Public Member Functions

 testConstruct ()
 

Protected Member Functions

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

Protected Attributes

 $backupGlobals = false
 
Container $dic
 

Detailed Description

Unit tests for class ilADTFactory.

Author
Stefan Meyer meyer.nosp@m.@lei.nosp@m.fos.c.nosp@m.om

Definition at line 12 of file ilADTFactoryTest.php.

Member Function Documentation

◆ initDependencies()

ilADTFactoryTest::initDependencies ( )
protected

Definition at line 42 of file ilADTFactoryTest.php.

References $dic, and $GLOBALS.

Referenced by setUp().

42  : void
43  {
44  $this->dic = new Container();
45  $GLOBALS['DIC'] = $this->dic;
46  }
Customizing of pimple-DIC for ILIAS.
Definition: Container.php:35
$GLOBALS["DIC"]
Definition: wac.php:30
+ Here is the caller graph for this function:

◆ setGlobalVariable()

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

Definition at line 31 of file ilADTFactoryTest.php.

References $c, $DIC, and $GLOBALS.

31  : void
32  {
33  global $DIC;
34 
35  $GLOBALS[$name] = $value;
36  unset($DIC[$name]);
37  $DIC[$name] = static function (\ILIAS\DI\Container $c) use ($value) {
38  return $value;
39  };
40  }
$c
Definition: deliver.php:9
Customizing of pimple-DIC for ILIAS.
Definition: Container.php:35
$GLOBALS["DIC"]
Definition: wac.php:30
global $DIC
Definition: shib_login.php:25

◆ setUp()

ilADTFactoryTest::setUp ( )
protected

Definition at line 18 of file ilADTFactoryTest.php.

References initDependencies().

18  : void
19  {
20  $this->initDependencies();
21  parent::setUp();
22  }
+ Here is the call graph for this function:

◆ testConstruct()

ilADTFactoryTest::testConstruct ( )

Definition at line 24 of file ilADTFactoryTest.php.

References ilADTFactory\getInstance().

24  : void
25  {
26  $first = ilADTFactory::getInstance();
27  $second = ilADTFactory::getInstance();
28  $this->assertEquals($first, $second);
29  }
+ Here is the call graph for this function:

Field Documentation

◆ $backupGlobals

ilADTFactoryTest::$backupGlobals = false
protected

Definition at line 14 of file ilADTFactoryTest.php.

◆ $dic

Container ilADTFactoryTest::$dic
protected

Definition at line 16 of file ilADTFactoryTest.php.

Referenced by initDependencies().


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