Test on button implementation.
More...
Test on button implementation.
Definition at line 45 of file PanelTest.php.
◆ getPanelFactory()
| PanelTest::getPanelFactory |
( |
| ) |
|
Definition at line 77 of file PanelTest.php.
77 : I\Component\Panel\Factory
79 return new I\Component\Panel\Factory(
80 $this->createMock(
C\Panel\Listing\Factory::class)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
◆ getUIFactory()
| PanelTest::getUIFactory |
( |
| ) |
|
Definition at line 47 of file PanelTest.php.
References ILIAS\Repository\button(), and ILIAS\Repository\symbol().
52 return new I\Component\Panel\Secondary\Factory();
56 return new I\Component\Dropdown\Factory();
64 return new I\Component\Button\Factory();
68 return new I\Component\Symbol\Factory(
button(string $caption, string $cmd)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
◆ testImplementsFactoryInterface()
| PanelTest::testImplementsFactoryInterface |
( |
| ) |
|
Definition at line 84 of file PanelTest.php.
References Vendor\Package\$f.
88 $this->assertInstanceOf(
"ILIAS\\UI\\Component\\Panel\\Factory",
$f);
89 $this->assertInstanceOf(
90 "ILIAS\\UI\\Component\\Panel\\Standard",
93 $this->assertInstanceOf(
94 "ILIAS\\UI\\Component\\Panel\\Sub",
97 $this->assertInstanceOf(
98 "ILIAS\\UI\\Component\\Panel\\Report",
◆ testRenderReport()
| PanelTest::testRenderReport |
( |
| ) |
|
Definition at line 315 of file PanelTest.php.
References $r.
319 $sub = $fp->sub(
"Title", array());
320 $card =
new I\Component\Card\Card(
"Card Title");
321 $sub = $sub->withFurtherInformation($card);
322 $report = $fp->report(
"Title", $sub);
326 $expected_html = <<<EOT
327 <div
class=
"panel panel-primary il-panel-report panel-flex">
328 <div
class=
"panel-heading ilHeader">
331 <div
class=
"panel-body">
332 <div
class=
"panel panel-sub panel-flex">
333 <div
class=
"panel-heading ilBlockHeader">
335 <div
class=
"panel-controls"></div>
337 <div
class=
"panel-body"><div
class=
"row">
338 <div
class=
"col-sm-8"></div>
339 <div
class=
"col-sm-4">
340 <div
class=
"il-card thumbnail">
341 <div
class=
"card-no-highlight"></div>
342 <div
class=
"caption card-title">
Card Title</div>
getDefaultRenderer(JavaScriptBinding $js_binding=null, array $with_stub_renderings=[])
brutallyTrimHTML(string $html)
A more radical version of normalizeHTML.
assertHTMLEquals(string $expected_html_as_string, string $html_as_string)
◆ testRenderStandard()
| PanelTest::testRenderStandard |
( |
| ) |
|
Definition at line 196 of file PanelTest.php.
References Vendor\Package\$f, $r, and ILIAS\Repository\button().
201 $actions =
new I\Component\Dropdown\Standard(array(
206 $p =
$f->standard(
"Title", array())->withActions($actions);
208 $html =
$r->render($p);
210 $expected_html = <<<EOT
211 <div
class=
"panel panel-primary panel-flex">
212 <div
class=
"panel-heading ilHeader">
213 <div
class=
"panel-title"><h2>
Title</h2></div>
214 <div
class=
"panel-controls">
215 <div
class=
"dropdown"><
button class=
"btn btn-default dropdown-toggle" type=
"button" data-toggle=
"dropdown" id=
"id_3" aria-label=
"actions" aria-haspopup=
"true" aria-expanded=
"false" aria-controls=
"id_3_menu"><span
class=
"caret"></span></
button>
216 <ul
id=
"id_3_menu" class=
"dropdown-menu">
217 <li><
button class=
"btn btn-link" data-action=
"https://www.ilias.de" id=
"id_1">
ILIAS</button></li>
218 <li><button
class=
"btn btn-link" data-action=
"https://www.github.com" id=
"id_2">GitHub</button></li>
223 <div
class=
"panel-body"></div>
getDefaultRenderer(JavaScriptBinding $js_binding=null, array $with_stub_renderings=[])
button(string $caption, string $cmd)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Class ChatMainBarProvider .
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
assertHTMLEquals(string $expected_html_as_string, string $html_as_string)
◆ testRenderSub()
| PanelTest::testRenderSub |
( |
| ) |
|
Definition at line 229 of file PanelTest.php.
References $r, and ILIAS\Repository\button().
234 $actions =
new I\Component\Dropdown\Standard(array(
239 $p = $fp->sub(
"Title", array())->withActions($actions);
240 $card =
new I\Component\Card\Card(
"Card Title");
242 $p = $p->withFurtherInformation($card);
245 $expected_html = <<<EOT
246 <div
class=
"panel panel-sub panel-flex">
247 <div
class=
"panel-heading ilBlockHeader">
249 <div
class=
"panel-controls">
250 <div
class=
"dropdown"><
button class=
"btn btn-default dropdown-toggle" type=
"button" data-toggle=
"dropdown" id=
"id_3" aria-label=
"actions" aria-haspopup=
"true" aria-expanded=
"false" aria-controls=
"id_3_menu"><span
class=
"caret"></span></
button>
251 <ul
id=
"id_3_menu" class=
"dropdown-menu">
252 <li><
button class=
"btn btn-link" data-action=
"https://www.ilias.de" id=
"id_1">
ILIAS</button></li>
253 <li><button
class=
"btn btn-link" data-action=
"https://www.github.com" id=
"id_2">GitHub</button></li>
258 <div
class=
"panel-body">
260 <div
class=
"col-sm-8"></div>
261 <div
class=
"col-sm-4">
262 <div
class=
"il-card thumbnail">
263 <div
class=
"card-no-highlight"></div>
264 <div
class=
"caption card-title">
Card Title</div>
getDefaultRenderer(JavaScriptBinding $js_binding=null, array $with_stub_renderings=[])
button(string $caption, string $cmd)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Class ChatMainBarProvider .
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
brutallyTrimHTML(string $html)
A more radical version of normalizeHTML.
assertHTMLEquals(string $expected_html_as_string, string $html_as_string)
◆ testRenderSubWithSecondaryPanel()
| PanelTest::testRenderSubWithSecondaryPanel |
( |
| ) |
|
Definition at line 275 of file PanelTest.php.
References $r.
280 $p = $fp->sub(
"Title", array());
281 $legacy =
new I\Component\Legacy\Legacy(
"Legacy content",
new SignalGenerator());
282 $secondary =
new I\Component\Panel\Secondary\Legacy(
"Legacy panel title", $legacy);
283 $p = $p->withFurtherInformation($secondary);
284 $html =
$r->render($p);
286 $expected_html = <<<EOT
287 <div
class=
"panel panel-sub panel-flex">
288 <div
class=
"panel-heading ilBlockHeader">
290 <div
class=
"panel-controls"></div>
292 <div
class=
"panel-body">
294 <div
class=
"col-sm-8"></div>
295 <div
class=
"col-sm-4">
296 <div
class=
"panel panel-secondary panel-flex">
297 <div
class=
"panel-heading ilHeader">
298 <div
class=
"panel-title"><h2>Legacy panel title</h2></div>
299 <div
class=
"panel-controls"></div>
301 <div
class=
"panel-body">Legacy content</div>
getDefaultRenderer(JavaScriptBinding $js_binding=null, array $with_stub_renderings=[])
brutallyTrimHTML(string $html)
A more radical version of normalizeHTML.
assertHTMLEquals(string $expected_html_as_string, string $html_as_string)
◆ testRenderWithPagination()
| PanelTest::testRenderWithPagination |
( |
| ) |
|
Definition at line 412 of file PanelTest.php.
References Vendor\Package\$f, $r, and ILIAS\Repository\button().
414 $pagination = $this->
getUIFactory()->viewControl()->pagination()
415 ->withTargetURL(
'http://ilias.de',
'page')
416 ->withTotalEntries(10)
418 ->withCurrentPage(1);
424 $p =
$f->standard(
"Title", [])
425 ->withViewControls([$pagination]);
427 $html =
$r->render($p);
429 $expected_html = <<<EOT
430 <div
class=
"panel panel-primary panel-flex">
431 <div
class=
"panel-heading ilHeader">
432 <div
class=
"panel-title"><h2>
Title</h2></div>
433 <div
class=
"panel-viewcontrols l-bar__space-keeper">
434 <div
class=
"il-viewcontrol-pagination l-bar__element">
435 <span
class=
"btn btn-ctrl browse previous">
436 <a tabindex=
"0" class=
"glyph" href=
"http://ilias.de?page=0" aria-label=
"back">
437 <span
class=
"glyphicon glyphicon-chevron-left" aria-hidden=
"true"></span>
440 <
button class=
"btn btn-link" data-action=
"http://ilias.de?page=0" id=
"id_1">1</button>
441 <button
class=
"btn btn-link engaged" aria-pressed=
"true" data-action=
"http://ilias.de?page=1" id=
"id_2">2</button>
442 <button
class=
"btn btn-link" data-action=
"http://ilias.de?page=2" id=
"id_3">3</button>
443 <button
class=
"btn btn-link" data-action=
"http://ilias.de?page=3" id=
"id_4">4</button>
444 <button
class=
"btn btn-link" data-action=
"http://ilias.de?page=4" id=
"id_5">5</button>
445 <span
class=
"btn btn-ctrl browse next">
446 <a tabindex=
"0" class=
"glyph" href=
"http://ilias.de?page=2" aria-label=
"next">
447 <span
class=
"glyphicon glyphicon-chevron-right" aria-hidden=
"true"></span>
452 <div
class=
"panel-controls"></div>
454 <div
class=
"panel-body"></div>
getDefaultRenderer(JavaScriptBinding $js_binding=null, array $with_stub_renderings=[])
button(string $caption, string $cmd)
brutallyTrimHTML(string $html)
A more radical version of normalizeHTML.
◆ testRenderWithSortation()
| PanelTest::testRenderWithSortation |
( |
| ) |
|
Definition at line 370 of file PanelTest.php.
References Vendor\Package\$f, $r, and ILIAS\Repository\button().
376 $sortation = $this->
getUIFactory()->viewControl()->sortation($sort_options);
382 $p =
$f->standard(
"Title", [])
383 ->withViewControls([$sortation]);
385 $html =
$r->render($p);
387 $expected_html = <<<EOT
388 <div
class=
"panel panel-primary panel-flex">
389 <div
class=
"panel-heading ilHeader">
390 <div
class=
"panel-title"><h2>
Title</h2></div>
391 <div
class=
"panel-viewcontrols l-bar__space-keeper">
392 <div
class=
"il-viewcontrol-sortation l-bar__element" id=
"id_1">
393 <div
class=
"dropdown"><
button class=
"btn btn-default dropdown-toggle" type=
"button" data-toggle=
"dropdown" id=
"id_4" aria-label=
"actions" aria-haspopup=
"true" aria-expanded=
"false" aria-controls=
"id_4_menu"><span
class=
"caret"></span></
button>
394 <ul
id=
"id_4_menu" class=
"dropdown-menu">
395 <li><
button class=
"btn btn-link" data-action=
"?sortation=a" id=
"id_2">
A</button></li>
396 <li><button
class=
"btn btn-link" data-action=
"?sortation=b" id=
"id_3">
B</button></li>
401 <div
class=
"panel-controls"></div>
403 <div
class=
"panel-body"></div>
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getDefaultRenderer(JavaScriptBinding $js_binding=null, array $with_stub_renderings=[])
button(string $caption, string $cmd)
brutallyTrimHTML(string $html)
A more radical version of normalizeHTML.
◆ testReportGetContent()
| PanelTest::testReportGetContent |
( |
| ) |
|
◆ testReportGetTitle()
| PanelTest::testReportGetTitle |
( |
| ) |
|
◆ testStandardGetContent()
| PanelTest::testStandardGetContent |
( |
| ) |
|
◆ testStandardGetTitle()
| PanelTest::testStandardGetTitle |
( |
| ) |
|
◆ testStandardWithActions()
| PanelTest::testStandardWithActions |
( |
| ) |
|
Definition at line 120 of file PanelTest.php.
126 $actions =
new I\Component\Dropdown\Standard(array(
131 $p = $p->withActions($actions);
133 $this->assertEquals($p->getActions(), $actions);
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
◆ testSubWithActions()
| PanelTest::testSubWithActions |
( |
| ) |
|
Definition at line 136 of file PanelTest.php.
142 $actions =
new I\Component\Dropdown\Standard(array(
147 $p = $p->withActions($actions);
149 $this->assertEquals($p->getActions(), $actions);
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
◆ testSubWithCard()
| PanelTest::testSubWithCard |
( |
| ) |
|
Definition at line 152 of file PanelTest.php.
158 $card =
new I\Component\Card\Card(
"Card Title");
160 $p = $p->withFurtherInformation($card);
162 $this->assertEquals($p->getFurtherInformation(), $card);
◆ testSubWithSecondaryPanel()
| PanelTest::testSubWithSecondaryPanel |
( |
| ) |
|
Definition at line 165 of file PanelTest.php.
171 $legacy =
new I\Component\Legacy\Legacy(
"Legacy content",
new SignalGenerator());
172 $secondary =
new I\Component\Panel\Secondary\Legacy(
"Legacy panel title", $legacy);
174 $p = $p->withFurtherInformation($secondary);
176 $this->assertEquals($p->getFurtherInformation(), $secondary);
◆ testWithViewControls()
| PanelTest::testWithViewControls |
( |
| ) |
|
Definition at line 355 of file PanelTest.php.
References Vendor\Package\$f.
361 $sortation = $this->
getUIFactory()->viewControl()->sortation($sort_options);
363 $p =
$f->standard(
"Title", [])
364 ->withViewControls([$sortation])
367 $this->assertEquals($p->getViewControls(), [$sortation]);
The documentation for this class was generated from the following file: