ILIAS  release_8 Revision v8.24
ilLDAPServerTest Class Reference

Class ilSessionTest. More...

+ Inheritance diagram for ilLDAPServerTest:
+ Collaboration diagram for ilLDAPServerTest:

Protected Member Functions

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

Detailed Description

Class ilSessionTest.

Definition at line 30 of file ilLDAPServerTest.php.

Member Function Documentation

◆ getLanguageMock()

ilLDAPServerTest::getLanguageMock ( )
protected
Returns
MockObject|ilLanguage

Definition at line 73 of file ilLDAPServerTest.php.

74 {
75 $lng = $this
76 ->getMockBuilder(ilLanguage::class)
77 ->disableOriginalConstructor()
78 ->onlyMethods(['txt', 'getInstalledLanguages', 'loadLanguageModule'])
79 ->getMock();
80
81 return $lng;
82 }
language handling
$lng

References $lng.

Referenced by setUp().

+ Here is the caller graph for this function:

◆ setGlobalVariable()

ilLDAPServerTest::setGlobalVariable ( string  $name,
  $value 
)
protected
Parameters
string$name
mixed$value

Definition at line 58 of file ilLDAPServerTest.php.

58 : void
59 {
60 global $DIC;
61
62 $GLOBALS[$name] = $value;
63
64 unset($DIC[$name]);
65 $DIC[$name] = static function ($c) use ($name) {
66 return $GLOBALS[$name];
67 };
68 }
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
Definition: PEAR.php:64
$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 setUp().

+ Here is the caller graph for this function:

◆ setUp()

ilLDAPServerTest::setUp ( )
protected

Definition at line 32 of file ilLDAPServerTest.php.

32 : void
33 {
34 $this->dic = new Container();
35 $GLOBALS['DIC'] = $this->dic;
36
37 $this->setGlobalVariable('lng', $this->getLanguageMock());
38 $this->setGlobalVariable(
39 'ilDB',
40 $this->getMockBuilder(ilDBInterface::class)->disableAutoReturnValueGeneration()->getMock()
41 );
42
43 $this->setGlobalVariable(
44 'ilSetting',
45 $this->getMockBuilder(\ILIAS\Administration\Setting::class)->getMock()
46 );
47 $this->setGlobalVariable(
48 'ilErr',
49 $this->getMockBuilder(ilErrorHandling::class)->getMock()
50 );
51 parent::setUp();
52 }
Customizing of pimple-DIC for ILIAS.
Definition: Container.php:32
setGlobalVariable(string $name, $value)
Class ChatMainBarProvider \MainMenu\Provider.
$dic
Definition: result.php:32

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

+ Here is the call graph for this function:

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