ILIAS
trunk Revision v11.0_alpha-1715-g7fc467680fb
◀ ilDoc Overview
Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
Namespace Members
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
+
Variables
$
c
e
g
h
j
l
m
p
s
t
u
v
+
Enumerations
a
c
e
f
i
j
l
m
n
o
p
r
s
t
u
v
z
+
Enumerator
a
c
d
e
f
g
i
l
m
n
o
p
q
s
t
u
v
y
+
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
+
Data Fields
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Ö
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Variables
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Ö
Enumerations
Enumerator
+
Files
File List
+
Globals
+
All
$
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
z
+
Functions
a
b
c
d
e
f
g
h
i
m
n
p
r
s
t
u
v
+
Variables
$
a
c
e
g
h
i
m
n
o
p
r
s
t
u
v
z
Enumerations
Enumerator
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Enumerations
Enumerator
Modules
Pages
ilECSUserTest.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
use
ILIAS\DI\Container
;
22
use
ILIAS\UI\Component\Legacy\Content
;
23
use
ILIAS\UI\Factory
;
24
use
PHPUnit\Framework\MockObject\MockObject
;
25
use
PHPUnit\Framework\TestCase
;
26
30
class
ilECSUserTest
extends
TestCase
31
{
32
protected
function
setUp
(): 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
}
44
49
protected
function
setGlobalVariable
(
string
$name, $value): 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
}
60
61
public
function
testConstructorWithArray
(): 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
}
75
}
ilECSUserTest\setGlobalVariable
setGlobalVariable(string $name, $value)
Definition:
ilECSUserTest.php:49
Factory
$c
$c
Definition:
deliver.php:25
ILIAS\UI\Component\Legacy\Content
ILIAS\DI\Container
Customizing of pimple-DIC for ILIAS.
Definition:
Container.php:35
MockObject
Container
ilECSUserTest\testConstructorWithArray
testConstructorWithArray()
Definition:
ilECSUserTest.php:61
ilECSUserTest\setUp
setUp()
Definition:
ilECSUserTest.php:32
$GLOBALS
$GLOBALS["DIC"]
Definition:
wac.php:53
$DIC
global $DIC
Definition:
shib_login.php:22
ilECSUserTest
Class ilSessionTest.
Definition:
ilECSUserTest.php:30
$dic
$dic
Definition:
result.php:31
TestCase
ilECSUser
Stores relevant user data.
Definition:
class.ilECSUser.php:26
TestCase
components
ILIAS
WebServices
ECS
test
ilECSUserTest.php
Generated on Sat Apr 5 2025 23:04:37 for ILIAS by
1.8.13 (using
Doxyfile
)