ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilExportOptionsTest Class Reference

Class ilExportOptionsTest. More...

+ Inheritance diagram for ilExportOptionsTest:
+ Collaboration diagram for ilExportOptionsTest:

Public Member Functions

 testConstruct ()
 

Protected Member Functions

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

Protected Attributes

 $backupGlobals = false
 
Container $dic
 

Detailed Description

Member Function Documentation

◆ initDependencies()

ilExportOptionsTest::initDependencies ( )
protected

Definition at line 64 of file ilExportOptionsTest.php.

64 : void
65 {
66 $this->dic = new Container();
67 $GLOBALS['DIC'] = $this->dic;
68
69 $this->setGlobalVariable('ilDB', $this->createMock(ilDBInterface::class));
70 }
Customizing of pimple-DIC for ILIAS.
Definition: Container.php:36
setGlobalVariable(string $name, $value)
$GLOBALS["DIC"]
Definition: wac.php:54

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()

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

Definition at line 53 of file ilExportOptionsTest.php.

53 : void
54 {
55 global $DIC;
56
57 $GLOBALS[$name] = $value;
58 unset($DIC[$name]);
59 $DIC[$name] = static function (\ILIAS\DI\Container $c) use ($value) {
60 return $value;
61 };
62 }
$c
Definition: deliver.php:25
global $DIC
Definition: shib_login.php:26

References $c, $DIC, and $GLOBALS.

Referenced by initDependencies().

+ Here is the caller graph for this function:

◆ setUp()

ilExportOptionsTest::setUp ( )
protected

Definition at line 34 of file ilExportOptionsTest.php.

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

References initDependencies().

+ Here is the call graph for this function:

◆ testConstruct()

ilExportOptionsTest::testConstruct ( )

Definition at line 40 of file ilExportOptionsTest.php.

40 : void
41 {
43 $this->assertNull($options);
44
45 $options = ilExportOptions::newInstance(0);
46 $this->assertTrue($options instanceof ilExportOptions);
47
48 $options_ref = ilExportOptions::getInstance();
49 $this->assertEquals($options, $options_ref);
50 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static newInstance(int $a_export_id)

References ilExportOptions\getInstance(), and ilExportOptions\newInstance().

+ Here is the call graph for this function:

Field Documentation

◆ $backupGlobals

ilExportOptionsTest::$backupGlobals = false
protected

Definition at line 30 of file ilExportOptionsTest.php.

◆ $dic

Container ilExportOptionsTest::$dic
protected

Definition at line 32 of file ilExportOptionsTest.php.

Referenced by initDependencies().


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