ILIAS  release_8 Revision v8.19-1-g4e8f2f9140c
All Data Structures Namespaces Files Functions Variables 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 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:31
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
Definition: PEAR.php:64
+ 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, $GLOBALS, and $name.

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: cli.php:38
Customizing of pimple-DIC for ILIAS.
Definition: Container.php:31
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

◆ 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: