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
DrilldownSlateTest.php
Go to the documentation of this file.
1
<?php
2
3
declare(strict_types=1);
4
21
require_once(
"libs/composer/vendor/autoload.php"
);
22
require_once(__DIR__ .
"/../../../Base.php"
);
23
24
use
ILIAS\UI\Component
as
C
;
25
use
ILIAS\UI\Implementation\Component
as
I
;
26
use
ILIAS\UI\Implementation\Component\MainControls\Slate\Drilldown
;
27
31
class
DrilldownSlateTest
extends
ILIAS_UI_TestBase
32
{
33
public
function
getUIFactory
():
NoUIFactory
34
{
35
return
new
class
() extends
NoUIFactory
{
36
protected
function
getSigGen()
37
{
38
return
new
I\SignalGenerator
();
39
}
40
41
public
function
menu(): C\Menu\Factory
42
{
43
return
new
I\Menu\Factory($this->getSigGen());
44
}
45
46
public
function
symbol(): C\Symbol\Factory
47
{
48
return
new
I\Symbol\Factory(
49
new
I
\Symbol\Icon\
Factory
(),
50
new
I
\Symbol\Glyph\
Factory
(),
51
new
I
\Symbol\Avatar\
Factory
()
52
);
53
}
54
55
public
function
mainControls(): C\MainControls\Factory
56
{
57
$slate_factory =
new
I\MainControls\Slate\Factory(
58
$this->getSigGen(),
59
new
I
\Counter\
Factory
(),
60
$this->symbol()
61
);
62
return
new
I\MainControls\Factory($this->getSigGen(), $slate_factory);
63
}
64
65
public
function
button(): C\Button\Factory
66
{
67
return
new
I\Button\Factory();
68
}
69
};
70
}
71
72
public
function
testImplementsFactoryInterface
():
Drilldown
73
{
74
$f
= $this->
getUIFactory
();
75
$slate =
$f
->mainControls()->slate()->drilldown(
76
"ddslate"
,
77
$f
->symbol()->icon()->custom(
''
,
''
),
78
$f
->menu()->drilldown(
'ddmenu'
, [])
79
);
80
$this->assertInstanceOf(
"ILIAS\\UI\\Component\\MainControls\\Slate\\Drilldown"
, $slate);
81
return
$slate;
82
}
83
87
public
function
testRendering
(
Drilldown
$slate): void
88
{
89
$r = $this->
getDefaultRenderer
();
90
$html = $r->render($slate);
91
92
$expected =
'
93
94
<div class="il-maincontrols-slate disengaged" id="id_3">
95
<div class="il-maincontrols-slate-content" data-replace-marker="content">
96
<div class="il-drilldown" id="id_2">
97
98
<header class="show-title show-backnav">
99
<h2>ddmenu</h2>
100
<div class="backnav">
101
<button class="btn btn-bulky" id="id_1" aria-label="back"><span class="glyph" role="img"><span class="glyphicon glyphicon-triangle-left" aria-hidden="true"></span></span><span class="bulky-label"></span></button>
102
</div>
103
</header>
104
<ul>
105
<li><button class="menulevel" aria-expanded="false">ddmenu<span class="glyphicon glyphicon-triangle-right" aria-hidden="true"></span></button>
106
<ul></ul>
107
</li>
108
</ul>
109
</div>
110
</div>
111
</div>
112
'
;
113
$this->assertEquals(
114
$this->
brutallyTrimHTML
($expected),
115
$this->
brutallyTrimHTML
($html)
116
);
117
}
118
}
NoUIFactory
Definition:
Base.php:53
ILIAS_UI_TestBase\getDefaultRenderer
getDefaultRenderer(JavaScriptBinding $js_binding=null, array $with_stub_renderings=[])
Definition:
Base.php:355
ILIAS\UI\Implementation\Component
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ILIAS\UI\Implementation
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ILIAS\UI\Component
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
DrilldownSlateTest\testImplementsFactoryInterface
testImplementsFactoryInterface()
Definition:
DrilldownSlateTest.php:72
ILIAS\UI\Implementation\Component\MainControls\Slate\Drilldown
Drilldown Slate.
Definition:
Drilldown.php:31
ILIAS_UI_TestBase\brutallyTrimHTML
brutallyTrimHTML(string $html)
A more radical version of normalizeHTML.
Definition:
Base.php:444
Factory
ILIAS_UI_TestBase
Provides common functionality for UI tests.
Definition:
Base.php:298
Drilldown
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Vendor\Package\$f
$f
Definition:
example_cleaned.php:49
DrilldownSlateTest\testRendering
testRendering(Drilldown $slate)
testImplementsFactoryInterface
Definition:
DrilldownSlateTest.php:87
ILIAS\UI\Implementation\Component\SignalGenerator
Definition:
SignalGenerator.php:29
DrilldownSlateTest
Tests for the DrilldownSlate.
Definition:
DrilldownSlateTest.php:31
DrilldownSlateTest\getUIFactory
getUIFactory()
Definition:
DrilldownSlateTest.php:33
tests
UI
Component
MainControls
Slate
DrilldownSlateTest.php
Generated on Sat Apr 5 2025 22:02:50 for ILIAS by
1.8.13 (using
Doxyfile
)