ILIAS
trunk Revision v11.0_alpha-1753-gb21ca8c4367
◀ 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
ModalBase.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
require_once(__DIR__ .
"/../../../../../../vendor/composer/vendor/autoload.php"
);
22
require_once(__DIR__ .
"/../../Base.php"
);
23
24
use
ILIAS\UI\Component
as
C
;
25
use
ILIAS\UI\Implementation
as
I
;
26
use
ILIAS\UI\Implementation\Component\Input\Field\Factory
as
FieldFactory
;
27
use
ILIAS\UI\Implementation\Component\Input\Field\Group
;
28
34
abstract
class
ModalBase
extends
ILIAS_UI_TestBase
35
{
36
public
function
getUIFactory
():
NoUIFactory
37
{
38
return
new
class
() extends
NoUIFactory
{
39
public
function
counter(): I\Component\Counter\Factory
40
{
41
return
new
I\Component\Counter\Factory();
42
}
43
public
function
legacy
(): I\Component\Legacy\Factory
44
{
45
return
new
I\Component\Legacy\Factory(
new
I
\
Component
\SignalGenerator());
46
}
47
};
48
}
49
50
protected
function
getModalFactory
():
I
\
Component
\Modal\Factory
51
{
52
$group_mock = $this->createMock(Group::class);
53
$group_mock->method(
'withNameFrom'
)->willReturnSelf();
54
55
$factory_mock = $this->createMock(FieldFactory::class);
56
$factory_mock->method(
'group'
)->willReturn($group_mock);
57
58
return
new
I\Component\Modal\Factory(
59
new
SignalGeneratorMock
(),
60
$this->createMock(
I
\
Component
\Modal\InterruptiveItem\Factory::class),
61
$factory_mock
62
);
63
}
64
65
protected
function
getButtonFactory
():
I
\
Component
\
Button
\Factory
66
{
67
return
new
I\Component\Button\Factory();
68
}
69
70
protected
function
getDummyComponent
():
DummyComponent
71
{
72
return
new
DummyComponent
();
73
}
74
75
public
function
normalizeHTML
(
string
$html): string
76
{
77
$html = parent::normalizeHTML($html);
78
// The times entity is used for closing the modal and not supported in DomDocument::loadXML()
79
return
str_replace([
'×'
,
"\t"
], [
''
,
''
], $html);
80
}
81
}
NoUIFactory
Definition:
Base.php:57
ModalBase\getButtonFactory
getButtonFactory()
Definition:
ModalBase.php:65
Standard
ILIAS\UI\Implementation
Factory
ILIAS\UI\Component
ModalBase\getUIFactory
getUIFactory()
Definition:
ModalBase.php:36
ModalBase\getDummyComponent
getDummyComponent()
Definition:
ModalBase.php:70
DummyComponent
Definition:
Base.php:319
ModalBase
Base class for modal tests.
Definition:
ModalBase.php:34
ILIAS\UI\examples\MainControls\Slate\Legacy\legacy
legacy()
expected output: > ILIAS shows the rendered Component.
Definition:
legacy.php:29
ILIAS_UI_TestBase
ModalBase\normalizeHTML
normalizeHTML(string $html)
Definition:
ModalBase.php:75
ModalBase\getModalFactory
getModalFactory()
Definition:
ModalBase.php:50
Factory
SignalGeneratorMock
Definition:
Base.php:315
ILIAS\ILIASObject\Creation\Group
Definition:
AddNewItemElementTypes.php:26
components
ILIAS
UI
tests
Component
Modal
ModalBase.php
Generated on Thu Apr 10 2025 23:04:30 for ILIAS by
1.8.13 (using
Doxyfile
)