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

Class ilSessionTest. More...

+ Inheritance diagram for ilECSUserTest:
+ Collaboration diagram for ilECSUserTest:

Public Member Functions

 testConstructorWithArray ()
 

Protected Member Functions

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

Detailed Description

Class ilSessionTest.

Definition at line 29 of file ilECSUserTest.php.

Member Function Documentation

◆ setGlobalVariable()

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

Definition at line 48 of file ilECSUserTest.php.

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

Referenced by setUp().

48  : void
49  {
50  global $DIC;
51 
52  $GLOBALS[$name] = $value;
53 
54  unset($DIC[$name]);
55  $DIC[$name] = static function ($c) use ($name) {
56  return $GLOBALS[$name];
57  };
58  }
$c
Definition: cli.php:38
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()

ilECSUserTest::setUp ( )
protected

Definition at line 31 of file ilECSUserTest.php.

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

31  : void
32  {
33  $this->dic = new Container();
34  $GLOBALS['DIC'] = $this->dic;
35 
36  $this->setGlobalVariable(
37  'ilSetting',
38  $this->getMockBuilder(ilSetting::class)->disableOriginalConstructor()->getMock()
39  );
40 
41  parent::setUp();
42  }
setGlobalVariable(string $name, $value)
Customizing of pimple-DIC for ILIAS.
Definition: Container.php:31
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
Definition: PEAR.php:64
$dic
Definition: result.php:32
+ Here is the call graph for this function:

◆ testConstructorWithArray()

ilECSUserTest::testConstructorWithArray ( )

Definition at line 60 of file ilECSUserTest.php.

60  : void
61  {
62  $testdata = [];
63  $testdata['ecs_login'] = 'testlogin';
64  $testdata['ecs_firstname'] = 'test_firstname';
65  $testdata['ecs_lastname'] = 'test_lastname';
66 
67  $testdata['ecs_institution'] = 'test_institution';
68  $testdata['ecs_email'] = 'test@email.nowhere';
69  $testdata['ecs_uid_hash'] = 'test_hash';
70 
71  $user = new ilECSUser($testdata);
72  $this->assertEquals('testlogin', $user->getLogin());
73  }
Stores relevant user data.

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