ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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 30 of file ilECSUserTest.php.

Member Function Documentation

◆ setGlobalVariable()

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

Definition at line 49 of file ilECSUserTest.php.

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

ilECSUserTest::setUp ( )
protected

Definition at line 32 of file ilECSUserTest.php.

32 : void
33 {
34 $this->dic = new Container();
35 $GLOBALS['DIC'] = $this->dic;
36
37 $this->setGlobalVariable(
38 'ilSetting',
39 $this->getMockBuilder(ilSetting::class)->disableOriginalConstructor()->getMock()
40 );
41
42 parent::setUp();
43 }
Customizing of pimple-DIC for ILIAS.
Definition: Container.php:36
setGlobalVariable(string $name, $value)
$dic
Definition: ltiresult.php:33

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

+ Here is the call graph for this function:

◆ testConstructorWithArray()

ilECSUserTest::testConstructorWithArray ( )

Definition at line 61 of file ilECSUserTest.php.

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

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