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.
52 return new I\Component\Panel\Secondary\Factory();
56 return new I\Component\Dropdown\Factory();
64 return new I\Component\Button\Factory();
66 public function symbol():
C\Symbol\
Factory 68 return new I\Component\Symbol\Factory(
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...
◆ test_implements_factory_interface()
PanelTest::test_implements_factory_interface |
( |
| ) |
|
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",
◆ test_render_report()
PanelTest::test_render_report |
( |
| ) |
|
Definition at line 309 of file PanelTest.php.
313 $sub = $fp->sub(
"Title", array());
314 $card =
new I\Component\Card\Card(
"Card Title");
315 $sub = $sub->withFurtherInformation($card);
316 $report = $fp->report(
"Title", $sub);
320 $expected_html = <<<EOT
321 <div
class=
"panel panel-primary il-panel-report panel-flex">
322 <div
class=
"panel-heading ilHeader">
325 <div
class=
"panel-body">
326 <div
class=
"panel panel-sub panel-flex">
327 <div
class=
"panel-heading ilBlockHeader">
330 <div
class=
"panel-body"><div
class=
"row">
331 <div
class=
"col-sm-8"></div>
332 <div
class=
"col-sm-4">
333 <div
class=
"il-card thumbnail">
334 <div
class=
"card-no-highlight"></div>
335 <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)
◆ test_render_standard()
PanelTest::test_render_standard |
( |
| ) |
|
Definition at line 196 of file PanelTest.php.
References Vendor\Package\$f.
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">
214 <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>
215 <ul
id=
"id_3_menu" class=
"dropdown-menu">
216 <li><button
class=
"btn btn-link" data-action=
"https://www.ilias.de" id=
"id_1">
ILIAS</button></li>
217 <li><button
class=
"btn btn-link" data-action=
"https://www.github.com" id=
"id_2">GitHub</button></li>
221 <div
class=
"panel-body"></div>
getDefaultRenderer(JavaScriptBinding $js_binding=null, array $with_stub_renderings=[])
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)
◆ test_render_sub()
PanelTest::test_render_sub |
( |
| ) |
|
Definition at line 227 of file PanelTest.php.
232 $actions =
new I\Component\Dropdown\Standard(array(
237 $p = $fp->sub(
"Title", array())->withActions($actions);
238 $card =
new I\Component\Card\Card(
"Card Title");
240 $p = $p->withFurtherInformation($card);
243 $expected_html = <<<EOT
244 <div
class=
"panel panel-sub panel-flex">
245 <div
class=
"panel-heading ilBlockHeader">
247 <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>
248 <ul
id=
"id_3_menu" class=
"dropdown-menu">
249 <li><button
class=
"btn btn-link" data-action=
"https://www.ilias.de" id=
"id_1">
ILIAS</button></li>
250 <li><button
class=
"btn btn-link" data-action=
"https://www.github.com" id=
"id_2">GitHub</button></li>
254 <div
class=
"panel-body">
256 <div
class=
"col-sm-8"></div>
257 <div
class=
"col-sm-4">
258 <div
class=
"il-card thumbnail">
259 <div
class=
"card-no-highlight"></div>
260 <div
class=
"caption card-title">
Card Title</div>
getDefaultRenderer(JavaScriptBinding $js_binding=null, array $with_stub_renderings=[])
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)
◆ test_render_sub_with_secondary_panel()
PanelTest::test_render_sub_with_secondary_panel |
( |
| ) |
|
Definition at line 271 of file PanelTest.php.
276 $p = $fp->sub(
"Title", array());
277 $legacy =
new I\Component\Legacy\Legacy(
"Legacy content",
new SignalGenerator());
278 $secondary =
new I\Component\Panel\Secondary\Legacy(
"Legacy panel title", $legacy);
279 $p = $p->withFurtherInformation($secondary);
280 $html = $r->render($p);
282 $expected_html = <<<EOT
283 <div
class=
"panel panel-sub panel-flex">
284 <div
class=
"panel-heading ilBlockHeader">
287 <div
class=
"panel-body">
289 <div
class=
"col-sm-8"></div>
290 <div
class=
"col-sm-4">
291 <div
class=
"panel panel-secondary panel-flex">
292 <div
class=
"panel-heading ilHeader">
293 <h2>Legacy panel title</h2>
295 <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)
◆ test_render_with_pagination()
PanelTest::test_render_with_pagination |
( |
| ) |
|
Definition at line 402 of file PanelTest.php.
References Vendor\Package\$f.
404 $pagination = $this->
getUIFactory()->viewControl()->pagination()
405 ->withTargetURL(
'http://ilias.de',
'page')
406 ->withTotalEntries(10)
408 ->withCurrentPage(1);
414 $p =
$f->standard(
"Title", [])
415 ->withViewControls([$pagination]);
417 $html = $r->render($p);
419 $expected_html = <<<EOT
420 <div
class=
"panel panel-primary panel-flex">
421 <div
class=
"panel-heading ilHeader">
423 <div
class=
"il-viewcontrol-pagination">
424 <span
class=
"browse previous">
425 <a tabindex=
"0" class=
"glyph" href=
"http://ilias.de?page=0" aria-label=
"back">
426 <span
class=
"glyphicon glyphicon-chevron-left" aria-hidden=
"true"></span>
429 <button
class=
"btn btn-link" data-action=
"http://ilias.de?page=0" id=
"id_1">1</button>
430 <button
class=
"btn btn-link engaged" aria-pressed=
"true" data-action=
"http://ilias.de?page=1" id=
"id_2">2</button>
431 <button
class=
"btn btn-link" data-action=
"http://ilias.de?page=2" id=
"id_3">3</button>
432 <button
class=
"btn btn-link" data-action=
"http://ilias.de?page=3" id=
"id_4">4</button>
433 <button
class=
"btn btn-link" data-action=
"http://ilias.de?page=4" id=
"id_5">5</button>
434 <span
class=
"browse next">
435 <a tabindex=
"0" class=
"glyph" href=
"http://ilias.de?page=2" aria-label=
"next">
436 <span
class=
"glyphicon glyphicon-chevron-right" aria-hidden=
"true"></span>
441 <div
class=
"panel-body"></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)
◆ test_render_with_sortation()
PanelTest::test_render_with_sortation |
( |
| ) |
|
Definition at line 363 of file PanelTest.php.
References Vendor\Package\$f.
369 $sortation = $this->
getUIFactory()->viewControl()->sortation($sort_options);
375 $p =
$f->standard(
"Title", [])
376 ->withViewControls([$sortation]);
379 $html = $r->render($p);
381 $expected_html = <<<EOT
382 <div
class=
"panel panel-primary panel-flex">
383 <div
class=
"panel-heading ilHeader">
385 <div
class=
"il-viewcontrol-sortation" id=
"id_1">
386 <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>
387 <ul
id=
"id_4_menu" class=
"dropdown-menu">
388 <li><button
class=
"btn btn-link" data-action=
"?sortation=a" id=
"id_2">
A</button>
390 <li><button
class=
"btn btn-link" data-action=
"?sortation=b" id=
"id_3">
B</button>
396 <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=[])
assertHTMLEquals(string $expected_html_as_string, string $html_as_string)
◆ test_report_get_content()
PanelTest::test_report_get_content |
( |
| ) |
|
◆ test_report_get_title()
PanelTest::test_report_get_title |
( |
| ) |
|
◆ test_standard_get_content()
PanelTest::test_standard_get_content |
( |
| ) |
|
◆ test_standard_get_title()
PanelTest::test_standard_get_title |
( |
| ) |
|
◆ test_standard_with_actions()
PanelTest::test_standard_with_actions |
( |
| ) |
|
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...
◆ test_sub_with_actions()
PanelTest::test_sub_with_actions |
( |
| ) |
|
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...
◆ test_sub_with_card()
PanelTest::test_sub_with_card |
( |
| ) |
|
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);
◆ test_sub_with_secondary_panel()
PanelTest::test_sub_with_secondary_panel |
( |
| ) |
|
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);
◆ test_with_view_controls()
PanelTest::test_with_view_controls |
( |
| ) |
|
Definition at line 348 of file PanelTest.php.
References Vendor\Package\$f.
354 $sortation = $this->
getUIFactory()->viewControl()->sortation($sort_options);
356 $p =
$f->standard(
"Title", [])
357 ->withViewControls([$sortation])
360 $this->assertEquals($p->getViewControls(), [$sortation]);
The documentation for this class was generated from the following file: