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

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  }
Customizing of pimple-DIC for ILIAS.
Definition: Container.php:35
$GLOBALS["DIC"]
Definition: wac.php:53
setGlobalVariable(string $name, $value)
+ 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.

References $c, $DIC, and $GLOBALS.

Referenced by initDependencies().

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

ilExportOptionsTest::setUp ( )
protected

Definition at line 34 of file ilExportOptionsTest.php.

References initDependencies().

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

◆ testConstruct()

ilExportOptionsTest::testConstruct ( )

Definition at line 40 of file ilExportOptionsTest.php.

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

40  : void
41  {
42  $options = ilExportOptions::getInstance();
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  }
static newInstance(int $a_export_id)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ 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: