5 require_once(__DIR__ .
"/../../../../libs/composer/vendor/autoload.php");
6 require_once(__DIR__ .
"/../../Base.php");
8 use \ILIAS\UI\Component as
C;
21 return new \ILIAS\UI\Implementation\Factory();
28 $this->assertInstanceOf(
"ILIAS\\UI\\Component\\Item\\Standard", $f->item()->standard(
"title"));
34 $c = $f->item()->standard(
"title");
36 $this->assertEquals($c->getTitle(),
"title");
43 $c = $f->item()->standard(
"title")->withDescription(
"description");
45 $this->assertEquals($c->getDescription(),
"description");
52 $props =
array(
"prop1" =>
"val1",
"prop2" =>
"val2");
53 $c = $f->item()->standard(
"title")->withProperties($props);
55 $this->assertEquals($c->getProperties(), $props);
62 $actions = $f->dropdown()->standard(
array(
63 $f->button()->shy(
"ILIAS",
"https://www.ilias.de"),
64 $f->button()->shy(
"GitHub",
"https://www.github.com")
66 $c = $f->item()->standard(
"title")->withActions($actions);
68 $this->assertEquals($c->getActions(), $actions);
74 $df = new \ILIAS\Data\Factory();
76 $color = $df->color(
'#ff00ff');
78 $c = $f->item()->standard(
"title")->withColor($color);
80 $this->assertEquals($c->getColor(), $color);
87 $image = $f->image()->standard(
"src",
"str");
89 $c = $f->item()->standard(
"title")->withLeadImage($image);
91 $this->assertEquals($c->getLead(), $image);
98 $c = $f->item()->standard(
"title")->withLeadText(
"text");
100 $this->assertEquals($c->getLead(),
"text");
107 $c = $f->item()->standard(
"title")->withLeadText(
"text")->withNoLead();
109 $this->assertEquals($c->getLead(), null);
117 $actions = $f->dropdown()->standard(
array(
118 $f->button()->shy(
"ILIAS",
"https://www.ilias.de"),
119 $f->button()->shy(
"GitHub",
"https://www.github.com")
121 $c = $f->item()->standard(
"Item Title")
122 ->withActions($actions)
123 ->withProperties(
array(
124 "Origin" =>
"Course Title 1",
125 "Last Update" =>
"24.11.2011",
126 "Location" =>
"Room 123, Main Street 44, 3012 Bern"))
127 ->withDescription(
"Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.");
131 <div
class=
"il-item il-std-item ">
133 <div
class=
"dropdown"><button
class=
"btn btn-default dropdown-toggle" type=
"button" data-toggle=
"dropdown" aria-haspopup=
"true" aria-expanded=
"false" > <span
class=
"caret"></span></button>
134 <ul
class=
"dropdown-menu">
135 <li><a
class=
"btn btn-link" href=
"https://www.ilias.de" data-action=
"https://www.ilias.de" >
ILIAS</a></li>
136 <li><a
class=
"btn btn-link" href=
"https://www.github.com" data-action=
"https://www.github.com" >GitHub</a></li>
139 <div
class=
"il-item-description">Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.</div>
140 <hr
class=
"il-item-divider" />
142 <div
class=
"col-md-6">
144 <div
class=
"col-sm-5 il-item-property-name">Origin</div>
145 <div
class=
"col-sm-7 il-item-property-value il-multi-line-cap-3">Course
Title 1</div>
148 <div
class=
"col-md-6">
150 <div
class=
"col-sm-5 il-item-property-name">Last Update</div>
151 <div
class=
"col-sm-7 il-item-property-value il-multi-line-cap-3">24.11.2011</div>
156 <div
class=
"col-md-6">
158 <div
class=
"col-sm-5 il-item-property-name">Location</div>
159 <div
class=
"col-sm-7 il-item-property-value il-multi-line-cap-3">Room 123, Main Street 44, 3012 Bern</div>
162 <div
class=
"col-md-6">
164 <div
class=
"col-sm-5 il-item-property-name"></div>
165 <div
class=
"col-sm-7 il-item-property-value il-multi-line-cap-3"></div>
180 $image = $f->image()->standard(
"src",
"str");
182 $c = $f->item()->standard(
"title")->withLeadImage($image);
187 <div
class=
"il-item il-std-item ">
189 <div
class=
"col-sm-3">
190 <img src=
"src" class=
"img-standard" alt=
"str" />
192 <div
class=
"col-sm-9">
206 $df = new \ILIAS\Data\Factory();
208 $color = $df->color(
'#ff00ff');
210 $c = $f->item()->standard(
"title")->withColor($color)->withLeadText(
"lead");
215 <div
class=
"il-item il-std-item il-item-marker " style=
"border-color:#ff00ff">
217 <div
class=
"col-sm-3">
220 <div
class=
"col-sm-9">
234 $df = new \ILIAS\Data\Factory();
236 $color = $df->color(
'#ff00ff');
238 $c = $f->item()->standard($f->button()->shy(
"ILIAS",
"https://www.ilias.de"))
239 ->withProperties(
array(
"test" => $f->button()->shy(
"GitHub",
"https://www.github.com")));
243 <div
class=
"il-item il-std-item ">
244 <h5><a
class=
"btn btn-link" href=
"https://www.ilias.de" data-action=
"https://www.ilias.de" >
ILIAS</a></h5>
245 <hr
class=
"il-item-divider" />
247 <div
class=
"col-md-6">
249 <div
class=
"col-sm-5 il-item-property-name">test</div>
250 <div
class=
"col-sm-7 il-item-property-value il-multi-line-cap-3"><a
class=
"btn btn-link" href=
"https://www.github.com" data-action=
"https://www.github.com" >GitHub</a></div>
253 <div
class=
"col-md-6">
255 <div
class=
"col-sm-5 il-item-property-name"></div>
256 <div
class=
"col-sm-7 il-item-property-value il-multi-line-cap-3"></div>
test_shy_title_and_property()
getDefaultRenderer(JavaScriptBinding $js_binding=null)
test_implements_factory_interface()
Provides common functionality for UI tests.
assertHTMLEquals($expected_html_as_string, $html_as_string)
test_render_lead_text_and_color()
Create styles array
The data for the language used.