ILIAS  trunk Revision v11.0_alpha-1843-g9e1fad99175
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
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.

References $data, $DIC, $ilDB, $lng, $res, $server, and null.

Referenced by setUp().

73  : ilLanguage
74  {
75  $lng = $this
76  ->getMockBuilder(ilLanguage::class)
77  ->disableOriginalConstructor()
78  ->onlyMethods(['txt', 'getInstalledLanguages', 'loadLanguageModule'])
79  ->getMock();
80 
81  return $lng;
82  }
global $lng
Definition: privfeed.php:31
+ 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.

References $c, $DIC, and $GLOBALS.

Referenced by setUp().

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
$GLOBALS["DIC"]
Definition: wac.php:53
global $DIC
Definition: shib_login.php:22
+ Here is the caller graph for this function:

◆ setUp()

ilLDAPServerTest::setUp ( )
protected

Definition at line 32 of file ilLDAPServerTest.php.

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

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  }
Interface Observer Contains several chained tasks and infos about them.
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:

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: