ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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 28 of file ilADTFactoryTest.php.

Member Function Documentation

◆ initDependencies()

ilADTFactoryTest::initDependencies ( )
protected

Definition at line 58 of file ilADTFactoryTest.php.

58 : void
59 {
60 $this->dic = new Container();
61 $GLOBALS['DIC'] = $this->dic;
62 }
Customizing of pimple-DIC for ILIAS.
Definition: Container.php:36
$GLOBALS["DIC"]
Definition: wac.php:54

References $dic, and $GLOBALS.

Referenced by setUp().

+ Here is the caller graph for this function:

◆ setGlobalVariable()

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

Definition at line 47 of file ilADTFactoryTest.php.

47 : void
48 {
49 global $DIC;
50
51 $GLOBALS[$name] = $value;
52 unset($DIC[$name]);
53 $DIC[$name] = static function (\ILIAS\DI\Container $c) use ($value) {
54 return $value;
55 };
56 }
$c
Definition: deliver.php:25
global $DIC
Definition: shib_login.php:26

References $c, $DIC, and $GLOBALS.

◆ setUp()

ilADTFactoryTest::setUp ( )
protected

Definition at line 34 of file ilADTFactoryTest.php.

34 : void
35 {
36 $this->initDependencies();
37 parent::setUp();
38 }

References initDependencies().

+ Here is the call graph for this function:

◆ testConstruct()

ilADTFactoryTest::testConstruct ( )

Definition at line 40 of file ilADTFactoryTest.php.

40 : void
41 {
43 $second = ilADTFactory::getInstance();
44 $this->assertEquals($first, $second);
45 }

References ilADTFactory\getInstance().

+ Here is the call graph for this function:

Field Documentation

◆ $backupGlobals

ilADTFactoryTest::$backupGlobals = false
protected

Definition at line 30 of file ilADTFactoryTest.php.

◆ $dic

Container ilADTFactoryTest::$dic
protected

Definition at line 32 of file ilADTFactoryTest.php.

Referenced by initDependencies().


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