ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ilWaitingListTest Class Reference

Unit tests for tree table. More...

+ Inheritance diagram for ilWaitingListTest:
+ Collaboration diagram for ilWaitingListTest:

Public Member Functions

 testConstruction ()
 

Protected Member Functions

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

Protected Attributes

 $backupGlobals = false
 
Container $dic
 

Detailed Description

Unit tests for tree table.

Author
Stefan Meyer meyer.nosp@m.@lei.nosp@m.fos.c.nosp@m.om

Definition at line 29 of file ilWaitingListTest.php.

Member Function Documentation

◆ initDependencies()

ilWaitingListTest::initDependencies ( )
protected

Definition at line 50 of file ilWaitingListTest.php.

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

Referenced by setUp().

50  : void
51  {
52  $this->dic = new Container();
53  $GLOBALS['DIC'] = $this->dic;
54 
55  $this->setGlobalVariable('ilDB', $this->createMock(ilDBInterface::class));
56  $this->setGlobalVariable('ilAppEventHandler', $this->createMock(ilAppEventHandler::class));
57  }
Customizing of pimple-DIC for ILIAS.
Definition: Container.php:31
setGlobalVariable(string $name, $value)
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
Definition: PEAR.php:64
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setGlobalVariable()

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

Definition at line 59 of file ilWaitingListTest.php.

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

Referenced by initDependencies().

59  : void
60  {
61  global $DIC;
62 
63  $GLOBALS[$name] = $value;
64  unset($DIC[$name]);
65  $DIC[$name] = static function (\ILIAS\DI\Container $c) use ($value) {
66  return $value;
67  };
68  }
$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()

ilWaitingListTest::setUp ( )
protected

Definition at line 35 of file ilWaitingListTest.php.

References initDependencies().

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

◆ testConstruction()

ilWaitingListTest::testConstruction ( )

Definition at line 41 of file ilWaitingListTest.php.

41  : void
42  {
43  $obj_id = 0;
44  $some_waiting_list = new class ($obj_id) extends ilWaitingList {
45  };
46  $instance = new $some_waiting_list($obj_id);
47  $this->assertInstanceOf(ilWaitingList::class, $instance);
48  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

Field Documentation

◆ $backupGlobals

ilWaitingListTest::$backupGlobals = false
protected

Definition at line 31 of file ilWaitingListTest.php.

◆ $dic

Container ilWaitingListTest::$dic
protected

Definition at line 33 of file ilWaitingListTest.php.

Referenced by initDependencies().


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