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

Unit tests for tree table. More...

+ Inheritance diagram for ilGroupEventHandlerTest:
+ Collaboration diagram for ilGroupEventHandlerTest:

Public Member Functions

 testConstruct ()
 

Protected Member Functions

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

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 35 of file ilGroupEventHandlerTest.php.

Member Function Documentation

◆ initDependencies()

ilGroupEventHandlerTest::initDependencies ( )
protected

Definition at line 64 of file ilGroupEventHandlerTest.php.

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

Referenced by setUp().

64  : void
65  {
66  $this->dic = new Container();
67  $GLOBALS['DIC'] = $this->dic;
68 
69  $logger = $this->getMockBuilder(ilLogger::class)
70  ->disableOriginalConstructor()
71  ->getMock();
72 
73  $logger_factory = $this->getMockBuilder(ilLoggerFactory::class)
74  ->disableOriginalConstructor()
75  ->onlyMethods(['getComponentLogger'])
76  ->getMock();
77  $logger_factory->method('getComponentLogger')->willReturn($logger);
78  $this->setGlobalVariable('ilLoggerFactory', $logger_factory);
79  }
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()

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

Definition at line 53 of file ilGroupEventHandlerTest.php.

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

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

ilGroupEventHandlerTest::setUp ( )
protected

Definition at line 41 of file ilGroupEventHandlerTest.php.

References initDependencies().

41  : void
42  {
43  $this->initDependencies();
44  parent::setUp();
45  }
+ Here is the call graph for this function:

◆ testConstruct()

ilGroupEventHandlerTest::testConstruct ( )

Definition at line 47 of file ilGroupEventHandlerTest.php.

47  : void
48  {
49  $listener = new ilGroupAppEventListener();
50  $this->assertTrue($listener instanceof ilGroupAppEventListener);
51  }

Field Documentation

◆ $backupGlobals

ilGroupEventHandlerTest::$backupGlobals = false
protected

Definition at line 37 of file ilGroupEventHandlerTest.php.

◆ $dic

Container ilGroupEventHandlerTest::$dic
protected

Definition at line 39 of file ilGroupEventHandlerTest.php.

Referenced by initDependencies().


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