ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilLDAPServerTest Class Reference

Class ilSessionTest. More...

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

Protected Member Functions

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

Private Attributes

Container $dic
 

Detailed Description

Class ilSessionTest.

Definition at line 28 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
global $lng
Definition: privfeed.php:31

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 }
$c
Definition: deliver.php:25
global $DIC
Definition: shib_login.php:26
$GLOBALS["DIC"]
Definition: wac.php:54

References $c, $DIC, and $GLOBALS.

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)->disableOriginalConstructor()->getMock()
50 );
51 parent::setUp();
52 }
Customizing of pimple-DIC for ILIAS.
Definition: Container.php:36
setGlobalVariable(string $name, $value)
Interface Observer \BackgroundTasks Contains several chained tasks and infos about them.

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

+ Here is the call graph for this function:

Field Documentation

◆ $dic

Container ilLDAPServerTest::$dic
private

Definition at line 30 of file ilLDAPServerTest.php.

Referenced by setUp().


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