ILIAS  release_8 Revision v8.24
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 13 of file ilCopyWizardOptionsTest.php.

Member Function Documentation

◆ initCopyWizardDependencies()

ilCopyWizardOptionsTest::initCopyWizardDependencies ( )
protected

Definition at line 48 of file ilCopyWizardOptionsTest.php.

48 : void
49 {
50 $this->dic = new Container();
51 $GLOBALS['DIC'] = $this->dic;
52
53 $this->setGlobalVariable('ilDB', $this->createMock(ilDBInterface::class));
54 $this->setGlobalVariable('tree', $this->createMock(ilTree::class));
55 }
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
Definition: PEAR.php:64
Customizing of pimple-DIC for ILIAS.
Definition: Container.php:32
setGlobalVariable(string $name, $value)

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

Referenced by setUp().

+ 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 37 of file ilCopyWizardOptionsTest.php.

37 : void
38 {
39 global $DIC;
40
41 $GLOBALS[$name] = $value;
42 unset($DIC[$name]);
43 $DIC[$name] = static function (Container $c) use ($value) {
44 return $value;
45 };
46 }
$c
Definition: cli.php:38
global $DIC
Definition: feed.php:28
if($format !==null) $name
Definition: metadata.php:247

References $c, $DIC, $GLOBALS, and $name.

Referenced by initCopyWizardDependencies().

+ Here is the caller graph for this function:

◆ setUp()

ilCopyWizardOptionsTest::setUp ( )
protected

Definition at line 19 of file ilCopyWizardOptionsTest.php.

19 : void
20 {
22 parent::setUp();
23 }

References initCopyWizardDependencies().

+ Here is the call graph for this function:

◆ testSingleton()

ilCopyWizardOptionsTest::testSingleton ( )

Definition at line 25 of file ilCopyWizardOptionsTest.php.

25 : void
26 {
29 $this->assertTrue($first === $second);
30 }
static _getInstance(int $a_copy_id)

References ilCopyWizardOptions\_getInstance().

+ Here is the call graph for this function:

Field Documentation

◆ $backupGlobals

ilCopyWizardOptionsTest::$backupGlobals = false
protected

Definition at line 15 of file ilCopyWizardOptionsTest.php.

◆ $dic

Container ilCopyWizardOptionsTest::$dic
protected

Definition at line 17 of file ilCopyWizardOptionsTest.php.

Referenced by initCopyWizardDependencies().


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