ILIAS
release_10 Revision v10.1-43-ga1241a92c2f
◀ ilDoc Overview
InfoScreenStandardGUIRequestTest.php
Go to the documentation of this file.
1
<?php
2
3
declare(strict_types=1);
4
5
use
PHPUnit\Framework\TestCase
;
6
use
ILIAS\InfoScreen\StandardGUIRequest
;
7
use
ILIAS\Data\Factory
;
8
14
class
InfoScreenStandardGUIRequestTest
extends
TestCase
15
{
16
protected
function
tearDown
(): void
17
{
18
}
19
20
protected
function
getRequest
(array $get, array
$post
):
StandardGUIRequest
21
{
22
$http_mock = $this->createMock(
ILIAS
\
HTTP
\Services::class);
23
$lng_mock = $this->createMock(ilLanguage::class);
24
$data
=
new
Factory
();
25
$refinery
= new \ILIAS\Refinery\Factory(
$data
, $lng_mock);
26
return
new
StandardGUIRequest
(
27
$http_mock,
28
$refinery
,
29
$get,
30
$post
31
);
32
}
33
37
public
function
testUserId
()
38
{
39
$request = $this->
getRequest
(
40
[
41
"user_id"
=>
"57"
42
],
43
[]
44
);
45
46
$this->assertEquals(
47
57,
48
$request->getUserId()
49
);
50
}
51
55
public
function
testLPEdit
()
56
{
57
$request = $this->
getRequest
(
58
[
59
],
60
[
61
"lp_edit"
=>
"1"
62
]
63
);
64
65
$this->assertEquals(
66
1,
67
$request->getLPEdit()
68
);
69
}
70
}
$data
$data
Definition:
ltiregistration.php:29
ILIAS\UI\examples\Layout\Page\Standard\$refinery
$refinery
Definition:
ui.php:121
InfoScreenStandardGUIRequestTest\testUserId
testUserId()
Test user id.
Definition:
InfoScreenStandardGUIRequestTest.php:37
ILIAS
Interface Observer Contains several chained tasks and infos about them.
Definition:
AccessControl.php:21
InfoScreenStandardGUIRequestTest\testLPEdit
testLPEdit()
Test lp edit.
Definition:
InfoScreenStandardGUIRequestTest.php:55
Services
Factory
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ILIAS\Data\Factory
Builds data types.
Definition:
Factory.php:35
InfoScreenStandardGUIRequestTest\getRequest
getRequest(array $get, array $post)
Definition:
InfoScreenStandardGUIRequestTest.php:20
InfoScreenStandardGUIRequestTest\tearDown
tearDown()
Definition:
InfoScreenStandardGUIRequestTest.php:16
StandardGUIRequest
InfoScreenStandardGUIRequestTest
Test clipboard repository.
Definition:
InfoScreenStandardGUIRequestTest.php:14
ILIAS\InfoScreen\StandardGUIRequest
Definition:
class.StandardGUIRequest.php:27
$post
$post
Definition:
ltitoken.php:46
TestCase
components
ILIAS
InfoScreen
tests
InfoScreenStandardGUIRequestTest.php
Generated on Wed Sep 10 2025 15:15:48 for ILIAS by
1.8.13 (using
Doxyfile
)