ILIAS
release_8 Revision v8.19
◀ ilDoc Overview
Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
Namespace Members
+
All
$
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
w
x
+
Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
+
Variables
$
a
b
c
d
e
f
g
h
j
l
m
p
s
t
u
+
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
Ö
+
Files
File List
+
Globals
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
z
+
Functions
_
a
b
c
d
e
g
h
i
m
n
p
r
s
t
u
v
x
+
Variables
$
a
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
z
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Modules
Pages
BlogStandardGUIRequestTest.php
Go to the documentation of this file.
1
<?php
2
3
use
PHPUnit\Framework\TestCase
;
4
8
class
BlogStandardGUIRequestTest
extends
TestCase
9
{
10
//protected $backupGlobals = false;
11
12
protected
function
setUp
(): void
13
{
14
parent::setUp();
15
}
16
17
protected
function
tearDown
(): void
18
{
19
}
20
21
protected
function
getRequest
(array $get, array
$post
): \
ILIAS
\Blog\StandardGUIRequest
22
{
23
$http_mock = $this->createMock(
ILIAS
\
HTTP
\Services::class);
24
$lng_mock = $this->createMock(ilLanguage::class);
25
$data
= new \ILIAS\Data\Factory();
26
$refinery
= new \ILIAS\Refinery\Factory(
$data
, $lng_mock);
27
return
new \ILIAS\Blog\StandardGUIRequest(
28
$http_mock,
29
$refinery
,
30
$get,
31
$post
32
);
33
}
34
35
public
function
testRefId
()
36
{
37
$request = $this->
getRequest
(
38
[
39
"ref_id"
=>
"5"
40
],
41
[]
42
);
43
44
$this->assertEquals(
45
5,
46
$request->getRefId()
47
);
48
}
49
50
public
function
testBlogPage
()
51
{
52
$request = $this->
getRequest
(
53
[
54
"blpg"
=>
"6"
55
],
56
[]
57
);
58
59
$this->assertEquals(
60
6,
61
$request->getBlogPage()
62
);
63
}
64
65
public
function
testObjIds
()
66
{
67
$request = $this->
getRequest
(
68
[
69
],
70
[
71
"obj_id"
=> [
"3"
,
"7"
]
72
]
73
);
74
75
$this->assertEquals(
76
[3,7],
77
$request->getObjIds()
78
);
79
}
80
81
public
function
testIds
()
82
{
83
$request = $this->
getRequest
(
84
[
85
],
86
[
87
"id"
=> [
"12"
,
"17"
]
88
]
89
);
90
91
$this->assertEquals(
92
[12,17],
93
$request->getIds()
94
);
95
}
96
97
public
function
testUserLogin
()
98
{
99
$request = $this->
getRequest
(
100
[
101
"user_login"
=>
"my_login"
102
],
103
[]
104
);
105
106
$this->assertEquals(
107
"my_login"
,
108
$request->getUserLogin()
109
);
110
}
111
112
public
function
testKeyword
()
113
{
114
$request = $this->
getRequest
(
115
[
116
"kwd"
=>
"my_keyw"
117
],
118
[]
119
);
120
121
$this->assertEquals(
122
"my_keyw"
,
123
$request->getKeyword()
124
);
125
}
126
}
$data
$data
Definition:
ltiregistration.php:31
BlogStandardGUIRequestTest\testKeyword
testKeyword()
Definition:
BlogStandardGUIRequestTest.php:112
ILIAS
Class ChatMainBarProvider .
BlogStandardGUIRequestTest\setUp
setUp()
Definition:
BlogStandardGUIRequestTest.php:12
BlogStandardGUIRequestTest\testIds
testIds()
Definition:
BlogStandardGUIRequestTest.php:81
BlogStandardGUIRequestTest
Definition:
BlogStandardGUIRequestTest.php:8
BlogStandardGUIRequestTest\testObjIds
testObjIds()
Definition:
BlogStandardGUIRequestTest.php:65
HTTP
BlogStandardGUIRequestTest\testRefId
testRefId()
Definition:
BlogStandardGUIRequestTest.php:35
BlogStandardGUIRequestTest\testBlogPage
testBlogPage()
Definition:
BlogStandardGUIRequestTest.php:50
BlogStandardGUIRequestTest\testUserLogin
testUserLogin()
Definition:
BlogStandardGUIRequestTest.php:97
BlogStandardGUIRequestTest\tearDown
tearDown()
Definition:
BlogStandardGUIRequestTest.php:17
$post
$post
Definition:
ltitoken.php:49
TestCase
BlogStandardGUIRequestTest\getRequest
getRequest(array $get, array $post)
Definition:
BlogStandardGUIRequestTest.php:21
ILIAS\Repository\$refinery
Refinery Factory $refinery
Definition:
trait.BaseGUIRequest.php:36
Modules
Blog
test
BlogStandardGUIRequestTest.php
Generated on Tue Apr 1 2025 22:01:21 for ILIAS by
1.8.13 (using
Doxyfile
)