ILIAS  trunk Revision v11.0_alpha-1715-g7fc467680fb
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilCopyWizardOptionsTest Class Reference

Unit tests for class ilCopyWizardOptions. More...

+ Inheritance diagram for ilCopyWizardOptionsTest:
+ Collaboration diagram for ilCopyWizardOptionsTest:

Public Member Functions

 testSingleton ()
 

Protected Member Functions

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

Protected Attributes

 $backupGlobals = false
 
Container $dic
 

Detailed Description

Unit tests for class ilCopyWizardOptions.

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

Definition at line 29 of file ilCopyWizardOptionsTest.php.

Member Function Documentation

◆ initCopyWizardDependencies()

ilCopyWizardOptionsTest::initCopyWizardDependencies ( )
protected

Definition at line 64 of file ilCopyWizardOptionsTest.php.

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

Referenced by setUp().

64  : void
65  {
66  $this->dic = new Container();
67  $GLOBALS['DIC'] = $this->dic;
68 
69  $this->setGlobalVariable('ilDB', $this->createMock(ilDBInterface::class));
70  $this->setGlobalVariable('tree', $this->createMock(ilTree::class));
71  }
Customizing of pimple-DIC for ILIAS.
Definition: Container.php:35
setGlobalVariable(string $name, $value)
$GLOBALS["DIC"]
Definition: wac.php:53
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setGlobalVariable()

ilCopyWizardOptionsTest::setGlobalVariable ( string  $name,
  $value 
)
protected
Parameters
string$name
mixed$value

Definition at line 53 of file ilCopyWizardOptionsTest.php.

References $c, $DIC, and $GLOBALS.

Referenced by initCopyWizardDependencies().

53  : void
54  {
55  global $DIC;
56 
57  $GLOBALS[$name] = $value;
58  unset($DIC[$name]);
59  $DIC[$name] = static function (Container $c) use ($value) {
60  return $value;
61  };
62  }
$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
+ Here is the caller graph for this function:

◆ setUp()

ilCopyWizardOptionsTest::setUp ( )
protected

Definition at line 35 of file ilCopyWizardOptionsTest.php.

References initCopyWizardDependencies().

35  : void
36  {
38  parent::setUp();
39  }
+ Here is the call graph for this function:

◆ testSingleton()

ilCopyWizardOptionsTest::testSingleton ( )

Definition at line 41 of file ilCopyWizardOptionsTest.php.

References ilCopyWizardOptions\_getInstance().

41  : void
42  {
45  $this->assertTrue($first === $second);
46  }
static _getInstance(int $a_copy_id)
+ Here is the call graph for this function:

Field Documentation

◆ $backupGlobals

ilCopyWizardOptionsTest::$backupGlobals = false
protected

Definition at line 31 of file ilCopyWizardOptionsTest.php.

◆ $dic

Container ilCopyWizardOptionsTest::$dic
protected

Definition at line 33 of file ilCopyWizardOptionsTest.php.

Referenced by initCopyWizardDependencies().


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