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

References $c, $DIC, and $GLOBALS.

Referenced by setUp().

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

◆ setUp()

ilECSUserTest::setUp ( )
protected

Definition at line 32 of file ilECSUserTest.php.

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

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  }
setGlobalVariable(string $name, $value)
Customizing of pimple-DIC for ILIAS.
Definition: Container.php:35
$GLOBALS["DIC"]
Definition: wac.php:53
$dic
Definition: result.php:31
+ 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: