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 244 of file PanelTest.php.
248 $sub = $fp->sub(
"Title", array());
249 $card =
new I\Component\Card\Card(
"Card Title");
250 $sub = $sub->withCard($card);
251 $report = $fp->report(
"Title", $sub);
253 $html = $r->render($report);
255 $expected_html = <<<EOT
256 <div
class=
"panel panel-primary il-panel-report panel-flex">
257 <div
class=
"panel-heading ilHeader">
260 <div
class=
"panel-body">
261 <div
class=
"panel panel-sub panel-flex">
262 <div
class=
"panel-heading ilBlockHeader">
265 <div
class=
"panel-body"><div
class=
"row">
266 <div
class=
"col-sm-8"></div>
267 <div
class=
"col-sm-4">
268 <div
class=
"il-card thumbnail">
269 <div
class=
"card-no-highlight"></div>
270 <div
class=
"caption">
getDefaultRenderer(JavaScriptBinding $js_binding=null)
assertHTMLEquals($expected_html_as_string, $html_as_string)
◆ 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 .
getDefaultRenderer(JavaScriptBinding $js_binding=null)
assertHTMLEquals($expected_html_as_string, $html_as_string)
◆ 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);
212 $html = $r->render($p);
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">
Class ChatMainBarProvider .
getDefaultRenderer(JavaScriptBinding $js_binding=null)
assertHTMLEquals($expected_html_as_string, $html_as_string)
◆ test_render_with_pagination()
PanelTest::test_render_with_pagination |
( |
| ) |
|
Definition at line 339 of file PanelTest.php.
References Vendor\Package\$f, and disabled().
341 $pagination = $this->
getUIFactory()->viewControl()->pagination()
342 ->withTargetURL(
'http://ilias.de',
'page')
343 ->withTotalEntries(10)
345 ->withCurrentPage(1);
351 $p =
$f->standard(
"Title", [])
352 ->withViewControls([$pagination]);
354 $html = $r->render($p);
356 $expected_html = <<<EOT
357 <div
class=
"panel panel-primary panel-flex">
358 <div
class=
"panel-heading ilHeader">
360 <div
class=
"il-viewcontrol-pagination">
361 <span
class=
"browse previous"><a
class=
"glyph" href=
"http://ilias.de?page=0" aria-label=
"back">
362 <span
class=
"glyphicon 363 glyphicon-chevron-left 364 " aria-hidden=
"true"></span>
367 <button
class=
"btn btn-link" data-action=
"http://ilias.de?page=0" id=
"id_1">1</button>
368 <button
class=
"btn btn-link" data-action=
"http://ilias.de?page=1" disabled=
"disabled">2</button>
369 <button
class=
"btn btn-link" data-action=
"http://ilias.de?page=2" id=
"id_2">3</button>
370 <button
class=
"btn btn-link" data-action=
"http://ilias.de?page=3" id=
"id_3">4</button>
371 <button
class=
"btn btn-link" data-action=
"http://ilias.de?page=4" id=
"id_4">5</button>
372 <span
class=
"browse next"><a
class=
"glyph" href=
"http://ilias.de?page=2" aria-label=
"next">
373 <span
class=
"glyphicon 374 glyphicon-chevron-right 375 " aria-hidden=
"true"></span>
381 <div
class=
"panel-body"></div>
getDefaultRenderer(JavaScriptBinding $js_binding=null)
disabled()
Example showing how to plug a disabled checkbox into a form.
assertHTMLEquals($expected_html_as_string, $html_as_string)
◆ test_render_with_sortation()
PanelTest::test_render_with_sortation |
( |
| ) |
|
Definition at line 300 of file PanelTest.php.
References Vendor\Package\$f.
306 $sortation = $this->
getUIFactory()->viewControl()->sortation($sort_options);
312 $p =
$f->standard(
"Title", [])
313 ->withViewControls([$sortation]);
316 $html = $r->render($p);
318 $expected_html = <<<EOT
319 <div
class=
"panel panel-primary panel-flex">
320 <div
class=
"panel-heading ilHeader">
322 <div
class=
"il-viewcontrol-sortation" id=
"">
323 <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>
324 <ul
class=
"dropdown-menu">
325 <li><button
class=
"btn btn-link" data-action=
"?sortation=a" id=
"id_1">
A</button>
327 <li><button
class=
"btn btn-link" data-action=
"?sortation=b" id=
"id_2">
B</button>
333 <div
class=
"panel-body"></div>
getDefaultRenderer(JavaScriptBinding $js_binding=null)
assertHTMLEquals($expected_html_as_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 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 285 of file PanelTest.php.
References Vendor\Package\$f.
291 $sortation = $this->
getUIFactory()->viewControl()->sortation($sort_options);
293 $p =
$f->standard(
"Title", [])
294 ->withViewControls([$sortation]);
297 $this->assertEquals($p->getViewControls(), [$sortation]);
The documentation for this class was generated from the following file: