ILIAS  trunk Revision v11.0_alpha-1731-gff9cd7e2bd3
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator 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 29 of file ilGroupEventHandlerTest.php.

Member Function Documentation

◆ initDependencies()

ilGroupEventHandlerTest::initDependencies ( )
protected

Definition at line 58 of file ilGroupEventHandlerTest.php.

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

Referenced by setUp().

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

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

Definition at line 47 of file ilGroupEventHandlerTest.php.

References $c, $DIC, and $GLOBALS.

Referenced by initDependencies().

47  : void
48  {
49  global $DIC;
50 
51  $GLOBALS[$name] = $value;
52  unset($DIC[$name]);
53  $DIC[$name] = static function (\ILIAS\DI\Container $c) use ($value) {
54  return $value;
55  };
56  }
$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()

ilGroupEventHandlerTest::setUp ( )
protected

Definition at line 35 of file ilGroupEventHandlerTest.php.

References initDependencies().

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

◆ testConstruct()

ilGroupEventHandlerTest::testConstruct ( )

Definition at line 41 of file ilGroupEventHandlerTest.php.

41  : void
42  {
43  $listener = new ilGroupAppEventListener();
44  $this->assertTrue($listener instanceof ilGroupAppEventListener);
45  }

Field Documentation

◆ $backupGlobals

ilGroupEventHandlerTest::$backupGlobals = false
protected

Definition at line 31 of file ilGroupEventHandlerTest.php.

◆ $dic

Container ilGroupEventHandlerTest::$dic
protected

Definition at line 33 of file ilGroupEventHandlerTest.php.

Referenced by initDependencies().


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