Test on button implementation.
More...
Test on button implementation.
Definition at line 25 of file PanelTest.php.
◆ getFactory()
PanelTest::getFactory |
( |
| ) |
|
- Returns
Definition at line 39 of file PanelTest.php.
41 return new \ILIAS\UI\Implementation\Factory();
◆ getPanelFactory()
PanelTest::getPanelFactory |
( |
| ) |
|
- Returns
Definition at line 31 of file PanelTest.php.
33 return new \ILIAS\UI\Implementation\Component\Panel\Factory();
◆ test_implements_factory_interface()
PanelTest::test_implements_factory_interface |
( |
| ) |
|
Definition at line 44 of file PanelTest.php.
References array.
48 $this->assertInstanceOf(
"ILIAS\\UI\\Component\\Panel\\Factory", $f);
49 $this->assertInstanceOf(
50 "ILIAS\\UI\\Component\\Panel\\Standard",
53 $this->assertInstanceOf(
54 "ILIAS\\UI\\Component\\Panel\\Sub",
57 $this->assertInstanceOf(
58 "ILIAS\\UI\\Component\\Panel\\Report",
Create styles array
The data for the language used.
◆ test_render_report()
PanelTest::test_render_report |
( |
| ) |
|
Definition at line 223 of file PanelTest.php.
References $html, $r, and array.
228 $sub = $fp->sub(
"Title",
array());
229 $card = $f->card(
"Card Title");
230 $sub = $sub->withCard($card);
231 $report = $fp->report(
"Title", $sub);
236 "<div class=\"panel panel-primary il-panel-report\">" .
237 " <div class=\"panel-heading ilHeader\">" .
238 "<h3 class=\"ilHeader\">Title</h3>" .
240 " <div class=\"panel-body\">" .
242 <div class=\"panel panel-primary\">" .
243 " <div class=\"panel-heading ilBlockHeader clearfix\">" .
246 " <div class=\"panel-body\"><div class=\"row\">" .
247 " <div class=\"col-sm-8\"></div>" .
248 " <div class=\"col-sm-4\">" .
249 " <div class=\"il-card thumbnail\"><div class=\"card-no-highlight\"></div><div class=\"caption\"><h5 class=\"card-title\">Card Title</h5></div></div>" .
getDefaultRenderer(JavaScriptBinding $js_binding=null)
assertHTMLEquals($expected_html_as_string, $html_as_string)
Create styles array
The data for the language used.
◆ test_render_standard()
PanelTest::test_render_standard |
( |
| ) |
|
Definition at line 147 of file PanelTest.php.
References $html, $r, array, and data.
152 $actions = $f->dropdown()->standard(
array(
153 $f->button()->shy(
"ILIAS",
"https://www.ilias.de"),
154 $f->button()->shy(
"GitHub",
"https://www.github.com")
157 $p = $f->panel()->standard(
"Title",
array())->withActions($actions);
161 $expected_html = <<<EOT
162 <div
class=
"panel panel-primary">
163 <div
class=
"panel-heading ilHeader clearfix">
164 <h3
class=
"ilHeader">
Title</h3>
165 <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>
166 <ul
class=
"dropdown-menu">
167 <li><a
class=
"btn btn-link" href=
"https://www.ilias.de" data-action=
"https://www.ilias.de">
ILIAS</a></li>
168 <li><a
class=
"btn btn-link" href=
"https://www.github.com" data-action=
"https://www.github.com">GitHub</a></li>
172 <div
class=
"panel-body"></div>
getDefaultRenderer(JavaScriptBinding $js_binding=null)
assertHTMLEquals($expected_html_as_string, $html_as_string)
Create styles array
The data for the language used.
◆ test_render_sub()
PanelTest::test_render_sub |
( |
| ) |
|
Definition at line 178 of file PanelTest.php.
References $html, $r, array, and data.
184 $actions = $f->dropdown()->standard(
array(
185 $f->button()->shy(
"ILIAS",
"https://www.ilias.de"),
186 $f->button()->shy(
"GitHub",
"https://www.github.com")
189 $p = $fp->sub(
"Title",
array())->withActions($actions);
190 $card = $f->card(
"Card Title");
191 $p = $p->withCard($card);
194 $expected_html = <<<EOT
195 <div
class=
"panel panel-primary">
196 <div
class=
"panel-heading ilBlockHeader clearfix">
198 <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>
199 <ul
class=
"dropdown-menu">
200 <li><a
class=
"btn btn-link" href=
"https://www.ilias.de" data-action=
"https://www.ilias.de">
ILIAS</a></li>
201 <li><a
class=
"btn btn-link" href=
"https://www.github.com" data-action=
"https://www.github.com">GitHub</a></li>
205 <div
class=
"panel-body">
207 <div
class=
"col-sm-8"></div>
208 <div
class=
"col-sm-4">
209 <div
class=
"il-card thumbnail">
210 <div
class=
"card-no-highlight"></div>
211 <div
class=
"caption">
getDefaultRenderer(JavaScriptBinding $js_binding=null)
assertHTMLEquals($expected_html_as_string, $html_as_string)
Create styles array
The data for the language used.
◆ test_report_get_content()
PanelTest::test_report_get_content |
( |
| ) |
|
Definition at line 137 of file PanelTest.php.
References array.
141 $p = $f->report(
"Title", $sub);
143 $this->assertEquals($p->getContent(),
array($sub));
Create styles array
The data for the language used.
◆ test_report_get_title()
PanelTest::test_report_get_title |
( |
| ) |
|
Definition at line 128 of file PanelTest.php.
References array.
132 $p = $f->report(
"Title",
array($sub));
134 $this->assertEquals($p->getTitle(),
"Title");
Create styles array
The data for the language used.
◆ test_standard_get_content()
PanelTest::test_standard_get_content |
( |
| ) |
|
Definition at line 71 of file PanelTest.php.
References array.
75 $p = $f->standard(
"Title",
array($c));
77 $this->assertEquals($p->getContent(),
array($c));
Create styles array
The data for the language used.
◆ test_standard_get_title()
PanelTest::test_standard_get_title |
( |
| ) |
|
Definition at line 63 of file PanelTest.php.
References array.
68 $this->assertEquals($p->getTitle(),
"Title");
Create styles array
The data for the language used.
◆ test_standard_with_actions()
PanelTest::test_standard_with_actions |
( |
| ) |
|
Definition at line 80 of file PanelTest.php.
References array.
87 $actions = $f->dropdown()->standard(
array(
88 $f->button()->shy(
"ILIAS",
"https://www.ilias.de"),
89 $f->button()->shy(
"GitHub",
"https://www.github.com")
92 $p = $p->withActions($actions);
94 $this->assertEquals($p->getActions(), $actions);
Create styles array
The data for the language used.
◆ test_sub_with_actions()
PanelTest::test_sub_with_actions |
( |
| ) |
|
Definition at line 97 of file PanelTest.php.
References array.
104 $actions = $f->dropdown()->standard(
array(
105 $f->button()->shy(
"ILIAS",
"https://www.ilias.de"),
106 $f->button()->shy(
"GitHub",
"https://www.github.com")
109 $p = $p->withActions($actions);
111 $this->assertEquals($p->getActions(), $actions);
Create styles array
The data for the language used.
◆ test_sub_with_card()
PanelTest::test_sub_with_card |
( |
| ) |
|
Definition at line 114 of file PanelTest.php.
References array.
121 $card = $f->card(
"Card Title");
123 $p = $p->withCard($card);
125 $this->assertEquals($p->getCard(), $card);
Create styles array
The data for the language used.
The documentation for this class was generated from the following file: