ILIAS  trunk Revision v11.0_alpha-1861-g09f3d197f78
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
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.

References $dic, and $GLOBALS.

Referenced by setUp().

58  : void
59  {
60  $this->dic = new Container();
61  $GLOBALS['DIC'] = $this->dic;
62  }
Customizing of pimple-DIC for ILIAS.
Definition: Container.php:35
$GLOBALS["DIC"]
Definition: wac.php:53
+ Here is the caller graph for this function:

◆ setGlobalVariable()

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

Definition at line 47 of file ilADTFactoryTest.php.

References $c, $DIC, and $GLOBALS.

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
Customizing of pimple-DIC for ILIAS.
Definition: Container.php:35
$GLOBALS["DIC"]
Definition: wac.php:53
global $DIC
Definition: shib_login.php:22

◆ setUp()

ilADTFactoryTest::setUp ( )
protected

Definition at line 34 of file ilADTFactoryTest.php.

References initDependencies().

34  : void
35  {
36  $this->initDependencies();
37  parent::setUp();
38  }
+ Here is the call graph for this function:

◆ testConstruct()

ilADTFactoryTest::testConstruct ( )

Definition at line 40 of file ilADTFactoryTest.php.

References ilADTFactory\getInstance().

40  : void
41  {
42  $first = ilADTFactory::getInstance();
43  $second = ilADTFactory::getInstance();
44  $this->assertEquals($first, $second);
45  }
+ 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: