ILIAS
trunk Revision v11.0_alpha-2662-g519ff7d528f
◀ ilDoc Overview
ContentStyleStandardGUIRequestTest.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
use
PHPUnit\Framework\TestCase
;
22
use
ILIAS\Style\Content\StandardGUIRequest
;
23
use
ILIAS\Data\Factory
;
24
30
class
ContentStyleStandardGUIRequestTest
extends
TestCase
31
{
32
protected
function
tearDown
(): void
33
{
34
}
35
36
protected
function
getRequest
(array $get, array
$post
):
StandardGUIRequest
37
{
38
$http_mock = $this->createMock(
ILIAS
\
HTTP
\Services::class);
39
$lng_mock = $this->createMock(ilLanguage::class);
40
$data
=
new
Factory
();
41
$refinery
= new \ILIAS\Refinery\Factory(
$data
, $lng_mock);
42
return
new
StandardGUIRequest
(
43
$http_mock,
44
$refinery
,
45
$get,
46
$post
47
);
48
}
49
50
public
function
testRefId
(): void
51
{
52
$request = $this->
getRequest
(
53
[
54
"ref_id"
=>
"5"
55
],
56
[]
57
);
58
59
$this->assertEquals(
60
5,
61
$request->getRefId()
62
);
63
}
64
65
66
public
function
testTemplateId
(): void
67
{
68
$request = $this->
getRequest
(
69
[
70
"t_id"
=>
"7"
71
],
72
[]
73
);
74
75
$this->assertEquals(
76
7,
77
$request->getTemplateId()
78
);
79
}
80
81
public
function
testCharacteristics
(): void
82
{
83
$request = $this->
getRequest
(
84
[
85
],
86
[
87
"char"
=> [
88
"Foo"
,
89
"Bar"
90
]
91
]
92
);
93
94
$this->assertEquals(
95
[
"Foo"
,
"Bar"
],
96
$request->getCharacteristics()
97
);
98
}
99
}
ILIAS\Style\Content\StandardGUIRequest
Definition:
class.StandardGUIRequest.php:27
$data
$data
Definition:
ltiregistration.php:29
ContentStyleStandardGUIRequestTest\getRequest
getRequest(array $get, array $post)
Definition:
ContentStyleStandardGUIRequestTest.php:36
ILIAS\UI\examples\Layout\Page\Standard\$refinery
$refinery
Definition:
ui.php:137
ContentStyleStandardGUIRequestTest\tearDown
tearDown()
Definition:
ContentStyleStandardGUIRequestTest.php:32
ILIAS
Interface Observer Contains several chained tasks and infos about them.
Definition:
AccessControl.php:21
ContentStyleStandardGUIRequestTest\testTemplateId
testTemplateId()
Definition:
ContentStyleStandardGUIRequestTest.php:66
Services
ContentStyleStandardGUIRequestTest\testCharacteristics
testCharacteristics()
Definition:
ContentStyleStandardGUIRequestTest.php:81
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
ContentStyleStandardGUIRequestTest
Test clipboard repository.
Definition:
ContentStyleStandardGUIRequestTest.php:30
ContentStyleStandardGUIRequestTest\testRefId
testRefId()
Definition:
ContentStyleStandardGUIRequestTest.php:50
$post
$post
Definition:
ltitoken.php:46
StandardGUIRequest
TestCase
TestCase
components
ILIAS
Style
Content
test
ContentStyleStandardGUIRequestTest.php
Generated on Wed Sep 3 2025 23:03:56 for ILIAS by
1.8.13 (using
Doxyfile
)