Test on button implementation.
More...
Test on button implementation.
Definition at line 27 of file PanelTest.php.
◆ getPanelFactory()
PanelTest::getPanelFactory |
( |
| ) |
|
- Returns
Definition at line 63 of file PanelTest.php.
65 return new I\Component\Panel\Factory(
66 $this->createMock(
C\Panel\Listing\Factory::class)
◆ getUIFactory()
PanelTest::getUIFactory |
( |
| ) |
|
Definition at line 29 of file PanelTest.php.
References $factory.
32 public function panelSecondary()
34 return new I\Component\Panel\Secondary\Factory();
36 public function dropdown()
38 return new I\Component\Dropdown\Factory();
40 public function viewControl()
44 public function button()
46 return new I\Component\Button\Factory();
48 public function symbol() :
C\Symbol\Factory
50 return new I\Component\Symbol\Factory(
◆ test_implements_factory_interface()
PanelTest::test_implements_factory_interface |
( |
| ) |
|
Definition at line 70 of file PanelTest.php.
References Vendor\Package\$f.
74 $this->assertInstanceOf(
"ILIAS\\UI\\Component\\Panel\\Factory",
$f);
75 $this->assertInstanceOf(
76 "ILIAS\\UI\\Component\\Panel\\Standard",
79 $this->assertInstanceOf(
80 "ILIAS\\UI\\Component\\Panel\\Sub",
83 $this->assertInstanceOf(
84 "ILIAS\\UI\\Component\\Panel\\Report",
◆ test_render_report()
PanelTest::test_render_report |
( |
| ) |
|
Definition at line 242 of file PanelTest.php.
246 $sub = $fp->sub(
"Title", array());
247 $card =
new I\Component\Card\Card(
"Card Title");
248 $sub = $sub->withCard($card);
249 $report = $fp->report(
"Title", $sub);
253 $expected_html = <<<EOT
254 <div
class=
"panel panel-primary il-panel-report panel-flex">
255 <div
class=
"panel-heading ilHeader">
258 <div
class=
"panel-body">
259 <div
class=
"panel panel-sub panel-flex">
260 <div
class=
"panel-heading ilBlockHeader">
263 <div
class=
"panel-body"><div
class=
"row">
264 <div
class=
"col-sm-8"></div>
265 <div
class=
"col-sm-4">
266 <div
class=
"il-card thumbnail">
267 <div
class=
"card-no-highlight"></div>
268 <div
class=
"caption card-title">
Card Title</div>
assertHTMLEquals($expected_html_as_string, $html_as_string)
brutallyTrimHTML($html)
A more radical version of normalizeHTML.
getDefaultRenderer(JavaScriptBinding $js_binding=null, $with_stub_renderings=[])
◆ test_render_standard()
PanelTest::test_render_standard |
( |
| ) |
|
Definition at line 168 of file PanelTest.php.
References Vendor\Package\$f.
173 $actions =
new I\Component\Dropdown\Standard(array(
178 $p =
$f->standard(
"Title", array())->withActions($actions);
180 $html = $r->render($p);
182 $expected_html = <<<EOT
183 <div
class=
"panel panel-primary panel-flex">
184 <div
class=
"panel-heading ilHeader">
186 <div
class=
"dropdown"><button
class=
"btn btn-default dropdown-toggle" type=
"button" data-toggle=
"dropdown" aria-label=
"actions" aria-haspopup=
"true" aria-expanded=
"false"> <span
class=
"caret"></span></button>
187 <ul
class=
"dropdown-menu">
188 <li><button
class=
"btn btn-link" data-action=
"https://www.ilias.de" id=
"id_1">
ILIAS</button></li>
189 <li><button
class=
"btn btn-link" data-action=
"https://www.github.com" id=
"id_2">GitHub</button></li>
193 <div
class=
"panel-body"></div>
Class ChatMainBarProvider .
assertHTMLEquals($expected_html_as_string, $html_as_string)
getDefaultRenderer(JavaScriptBinding $js_binding=null, $with_stub_renderings=[])
◆ test_render_sub()
PanelTest::test_render_sub |
( |
| ) |
|
Definition at line 199 of file PanelTest.php.
204 $actions =
new I\Component\Dropdown\Standard(array(
209 $p = $fp->sub(
"Title", array())->withActions($actions);
210 $card =
new I\Component\Card\Card(
"Card Title");
211 $p = $p->withCard($card);
214 $expected_html = <<<EOT
215 <div
class=
"panel panel-sub panel-flex">
216 <div
class=
"panel-heading ilBlockHeader">
218 <div
class=
"dropdown"><button
class=
"btn btn-default dropdown-toggle" type=
"button" data-toggle=
"dropdown" aria-label=
"actions" aria-haspopup=
"true" aria-expanded=
"false"> <span
class=
"caret"></span></button>
219 <ul
class=
"dropdown-menu">
220 <li><button
class=
"btn btn-link" data-action=
"https://www.ilias.de" id=
"id_1">
ILIAS</button></li>
221 <li><button
class=
"btn btn-link" data-action=
"https://www.github.com" id=
"id_2">GitHub</button></li>
225 <div
class=
"panel-body">
227 <div
class=
"col-sm-8"></div>
228 <div
class=
"col-sm-4">
229 <div
class=
"il-card thumbnail">
230 <div
class=
"card-no-highlight"></div>
231 <div
class=
"caption card-title">
Card Title</div>
Class ChatMainBarProvider .
assertHTMLEquals($expected_html_as_string, $html_as_string)
brutallyTrimHTML($html)
A more radical version of normalizeHTML.
getDefaultRenderer(JavaScriptBinding $js_binding=null, $with_stub_renderings=[])
◆ test_render_with_pagination()
PanelTest::test_render_with_pagination |
( |
| ) |
|
Definition at line 335 of file PanelTest.php.
References Vendor\Package\$f.
337 $pagination = $this->
getUIFactory()->viewControl()->pagination()
338 ->withTargetURL(
'http://ilias.de',
'page')
339 ->withTotalEntries(10)
341 ->withCurrentPage(1);
347 $p =
$f->standard(
"Title", [])
348 ->withViewControls([$pagination]);
350 $html = $r->render($p);
352 $expected_html = <<<EOT
353 <div
class=
"panel panel-primary panel-flex">
354 <div
class=
"panel-heading ilHeader">
356 <div
class=
"il-viewcontrol-pagination">
357 <span
class=
"browse previous"><a
class=
"glyph" href=
"http://ilias.de?page=0" aria-label=
"back">
358 <span
class=
"glyphicon 359 glyphicon-chevron-left 360 " aria-hidden=
"true"></span>
363 <button
class=
"btn btn-link" data-action=
"http://ilias.de?page=0" id=
"id_1">1</button>
364 <button
class=
"btn btn-link engaged" aria-pressed=
"true" data-action=
"http://ilias.de?page=1" id=
"id_2">2</button>
365 <button
class=
"btn btn-link" data-action=
"http://ilias.de?page=2" id=
"id_3">3</button>
366 <button
class=
"btn btn-link" data-action=
"http://ilias.de?page=3" id=
"id_4">4</button>
367 <button
class=
"btn btn-link" data-action=
"http://ilias.de?page=4" id=
"id_5">5</button>
368 <span
class=
"browse next"><a
class=
"glyph" href=
"http://ilias.de?page=2" aria-label=
"next">
369 <span
class=
"glyphicon 370 glyphicon-chevron-right 371 " aria-hidden=
"true"></span>
377 <div
class=
"panel-body"></div>
assertHTMLEquals($expected_html_as_string, $html_as_string)
getDefaultRenderer(JavaScriptBinding $js_binding=null, $with_stub_renderings=[])
◆ test_render_with_sortation()
PanelTest::test_render_with_sortation |
( |
| ) |
|
Definition at line 296 of file PanelTest.php.
References Vendor\Package\$f.
302 $sortation = $this->
getUIFactory()->viewControl()->sortation($sort_options);
308 $p =
$f->standard(
"Title", [])
309 ->withViewControls([$sortation]);
312 $html = $r->render($p);
314 $expected_html = <<<EOT
315 <div
class=
"panel panel-primary panel-flex">
316 <div
class=
"panel-heading ilHeader">
318 <div
class=
"il-viewcontrol-sortation" id=
"id_1">
319 <div
class=
"dropdown"><button
class=
"btn btn-default dropdown-toggle" type=
"button" data-toggle=
"dropdown" aria-label=
"actions" aria-haspopup=
"true" aria-expanded=
"false" > <span
class=
"caret"></span></button>
320 <ul
class=
"dropdown-menu">
321 <li><button
class=
"btn btn-link" data-action=
"?sortation=a" id=
"id_2">
A</button>
323 <li><button
class=
"btn btn-link" data-action=
"?sortation=b" id=
"id_3">
B</button>
329 <div
class=
"panel-body"></div>
assertHTMLEquals($expected_html_as_string, $html_as_string)
getDefaultRenderer(JavaScriptBinding $js_binding=null, $with_stub_renderings=[])
◆ 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 106 of file PanelTest.php.
112 $actions =
new I\Component\Dropdown\Standard(array(
117 $p = $p->withActions($actions);
119 $this->assertEquals($p->getActions(), $actions);
◆ test_sub_with_actions()
PanelTest::test_sub_with_actions |
( |
| ) |
|
Definition at line 122 of file PanelTest.php.
128 $actions =
new I\Component\Dropdown\Standard(array(
133 $p = $p->withActions($actions);
135 $this->assertEquals($p->getActions(), $actions);
◆ test_sub_with_card()
PanelTest::test_sub_with_card |
( |
| ) |
|
Definition at line 138 of file PanelTest.php.
144 $card =
new I\Component\Card\Card(
"Card Title");
146 $p = $p->withCard($card);
148 $this->assertEquals($p->getCard(), $card);
◆ test_with_view_controls()
PanelTest::test_with_view_controls |
( |
| ) |
|
Definition at line 281 of file PanelTest.php.
References Vendor\Package\$f.
287 $sortation = $this->
getUIFactory()->viewControl()->sortation($sort_options);
289 $p =
$f->standard(
"Title", [])
290 ->withViewControls([$sortation]);
293 $this->assertEquals($p->getViewControls(), [$sortation]);
The documentation for this class was generated from the following file: