ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables 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 48 of file ilExportOptionsTest.php.

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

Referenced by setUp().

48  : void
49  {
50  $this->dic = new Container();
51  $GLOBALS['DIC'] = $this->dic;
52 
53  $this->setGlobalVariable('ilDB', $this->createMock(ilDBInterface::class));
54  }
Customizing of pimple-DIC for ILIAS.
Definition: Container.php:31
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
Definition: PEAR.php:64
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 37 of file ilExportOptionsTest.php.

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

Referenced by initDependencies().

37  : void
38  {
39  global $DIC;
40 
41  $GLOBALS[$name] = $value;
42  unset($DIC[$name]);
43  $DIC[$name] = static function (\ILIAS\DI\Container $c) use ($value) {
44  return $value;
45  };
46  }
$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
+ Here is the caller graph for this function:

◆ setUp()

ilExportOptionsTest::setUp ( )
protected

Definition at line 18 of file ilExportOptionsTest.php.

References initDependencies().

18  : void
19  {
20  $this->initDependencies();
21  parent::setUp();
22  }
+ Here is the call graph for this function:

◆ testConstruct()

ilExportOptionsTest::testConstruct ( )

Definition at line 24 of file ilExportOptionsTest.php.

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

24  : void
25  {
26  $options = ilExportOptions::getInstance();
27  $this->assertNull($options);
28 
29  $options = ilExportOptions::newInstance(0);
30  $this->assertTrue($options instanceof ilExportOptions);
31 
32  $options_ref = ilExportOptions::getInstance();
33  $this->assertEquals($options, $options_ref);
34  }
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 14 of file ilExportOptionsTest.php.

◆ $dic

Container ilExportOptionsTest::$dic
protected

Definition at line 16 of file ilExportOptionsTest.php.

Referenced by initDependencies().


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