ILIAS  release_8 Revision v8.24
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.

48 : void
49 {
50 $this->dic = new Container();
51 $GLOBALS['DIC'] = $this->dic;
52
53 $this->setGlobalVariable('ilDB', $this->createMock(ilDBInterface::class));
54 }
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()

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

Definition at line 37 of file ilExportOptionsTest.php.

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
global $DIC
Definition: feed.php:28
if($format !==null) $name
Definition: metadata.php:247

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

Referenced by initDependencies().

+ Here is the caller graph for this function:

◆ setUp()

ilExportOptionsTest::setUp ( )
protected

Definition at line 18 of file ilExportOptionsTest.php.

18 : void
19 {
20 $this->initDependencies();
21 parent::setUp();
22 }

References initDependencies().

+ Here is the call graph for this function:

◆ testConstruct()

ilExportOptionsTest::testConstruct ( )

Definition at line 24 of file ilExportOptionsTest.php.

24 : void
25 {
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 }
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 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: