Test on Pagination view control.
More...
Test on Pagination view control.
Definition at line 14 of file PaginationTest.php.
◆ getFactory()
PaginationTest::getFactory |
( |
| ) |
|
|
private |
◆ getUIFactory()
PaginationTest::getUIFactory |
( |
| ) |
|
Definition at line 16 of file PaginationTest.php.
References $factory.
19 public function symbol() :
C\Symbol\Factory
21 return new IC\Symbol\Factory(
22 new IC\Symbol\Icon\Factory(),
23 new IC\Symbol\Glyph\Factory(),
24 new IC\Symbol\Avatar\Factory()
27 public function button()
31 public function dropdown()
33 return new IC\Dropdown\Factory();
◆ testAttributes()
PaginationTest::testAttributes |
( |
| ) |
|
Definition at line 59 of file PaginationTest.php.
References Vendor\Package\$f, and getFactory().
65 $target_url =
'http://testurl';
66 $parameter_name =
"param_name";
67 $max_page_options = 10;
71 ->withTargetURL($target_url, $parameter_name)
72 ->withTotalEntries($total_entries)
73 ->withPageSize($page_size)
74 ->withCurrentPage($current_page)
75 ->withMaxPaginationButtons($max_page_options)
78 $this->assertEquals($target_url, $p->getTargetURL());
79 $this->assertEquals($parameter_name, $p->getParameterName());
80 $this->assertEquals($page_size, $p->getPageSize());
81 $this->assertEquals($current_page, $p->getCurrentPage());
82 $this->assertEquals($max_page_options, $p->getMaxPaginationButtons());
83 $this->assertEquals(2, $p->getNumberOfPages());
84 $this->assertEquals(11, $p->getPageLength());
◆ testConstruction()
PaginationTest::testConstruction |
( |
| ) |
|
Definition at line 45 of file PaginationTest.php.
References Vendor\Package\$f, and getFactory().
48 $pagination =
$f->pagination();
49 $this->assertInstanceOf(
50 "ILIAS\\UI\\Component\\ViewControl\\Pagination",
53 $this->assertInstanceOf(
54 "ILIAS\\UI\\Component\\Signal",
55 $pagination->getInternalSignal()
◆ testRenderDropdown()
PaginationTest::testRenderDropdown |
( |
| ) |
|
Definition at line 262 of file PaginationTest.php.
References ILIAS_UI_TestBase\assertHTMLEquals(), disabled(), ILIAS_UI_TestBase\getDefaultRenderer(), and getFactory().
265 ->withTotalEntries(3)
269 $expected_html = <<<EOT
270 <div
class=
"il-viewcontrol-pagination">
271 <span
class=
"browse previous">
272 <a
class=
"glyph disabled" aria-label=
"back" aria-
disabled=
"true">
273 <span
class=
"glyphicon glyphicon-chevron-left" aria-hidden=
"true"></span>
277 <div
class=
"dropdown">
278 <button
class=
"btn btn-default dropdown-toggle" type=
"button" data-toggle=
"dropdown" aria-haspopup=
"true" aria-expanded=
"false">pagination_label_x_of_y <span
class=
"caret"></span></button>
279 <ul
class=
"dropdown-menu">
280 <li><button
class=
"btn btn-link" data-action=
"?pagination_offset=0" disabled=
"disabled">1</button></li>
281 <li><button
class=
"btn btn-link" data-action=
"?pagination_offset=1" id=
"id_1">2</button></li>
282 <li><button
class=
"btn btn-link" data-action=
"?pagination_offset=2" id=
"id_2">3</button></li>
286 <span
class=
"browse next">
287 <a
class=
"glyph" href=
"?pagination_offset=1" aria-label=
"next">
288 <span
class=
"glyphicon glyphicon-chevron-right" aria-hidden=
"true"></span>
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)
◆ testRenderLimited()
PaginationTest::testRenderLimited |
( |
| ) |
|
Definition at line 150 of file PaginationTest.php.
References ILIAS_UI_TestBase\assertHTMLEquals(), disabled(), ILIAS_UI_TestBase\getDefaultRenderer(), and getFactory().
153 ->withTotalEntries(3)
155 ->withMaxPaginationButtons(1);
160 $expected_html = <<<EOT
161 <div
class=
"il-viewcontrol-pagination">
162 <span
class=
"browse previous">
163 <a
class=
"glyph disabled" aria-label=
"back" aria-
disabled=
"true">
164 <span
class=
"glyphicon glyphicon-chevron-left" aria-hidden=
"true"></span>
168 <button
class=
"btn btn-link" data-action=
"?pagination_offset=0" disabled=
"true">1</button>
171 <button
class=
"btn btn-link" data-action=
"?pagination_offset=2" id=
"id_1">3</button>
174 <span
class=
"browse next">
175 <a
class=
"glyph" href=
"?pagination_offset=1" aria-label=
"next">
176 <span
class=
"glyphicon glyphicon-chevron-right" aria-hidden=
"true"></span>
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)
◆ testRenderLimitedWithCurrentPage()
PaginationTest::testRenderLimitedWithCurrentPage |
( |
| ) |
|
Definition at line 185 of file PaginationTest.php.
References ILIAS_UI_TestBase\assertHTMLEquals(), disabled(), ILIAS_UI_TestBase\getDefaultRenderer(), and getFactory().
188 ->withTotalEntries(3)
190 ->withMaxPaginationButtons(1)
191 ->withCurrentPage(1);
196 $expected_html = <<<EOT
197 <div
class=
"il-viewcontrol-pagination">
198 <span
class=
"browse previous">
199 <a
class=
"glyph" href=
"?pagination_offset=0" aria-label=
"back">
200 <span
class=
"glyphicon glyphicon-chevron-left" aria-hidden=
"true"></span>
205 <button
class=
"btn btn-link" data-action=
"?pagination_offset=0" id=
"id_1">1</button>
208 <button
class=
"btn btn-link" data-action=
"?pagination_offset=1" disabled=
"true">2</button>
211 <button
class=
"btn btn-link" data-action=
"?pagination_offset=2" id=
"id_2">3</button>
214 <span
class=
"browse next">
215 <a
class=
"glyph" href=
"?pagination_offset=2" aria-label=
"next">
216 <span
class=
"glyphicon glyphicon-chevron-right" aria-hidden=
"true"></span>
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)
◆ testRenderLimitedWithCurrentPage2()
PaginationTest::testRenderLimitedWithCurrentPage2 |
( |
| ) |
|
Definition at line 225 of file PaginationTest.php.
References ILIAS_UI_TestBase\assertHTMLEquals(), disabled(), ILIAS_UI_TestBase\getDefaultRenderer(), and getFactory().
228 ->withTotalEntries(3)
230 ->withMaxPaginationButtons(1)
231 ->withCurrentPage(2);
236 $expected_html = <<<EOT
237 <div
class=
"il-viewcontrol-pagination">
238 <span
class=
"browse previous">
239 <a
class=
"glyph" href=
"?pagination_offset=1" aria-label=
"back">
240 <span
class=
"glyphicon glyphicon-chevron-left" aria-hidden=
"true"></span>
244 <button
class=
"btn btn-link" data-action=
"?pagination_offset=0" id=
"id_1">1</button>
247 <button
class=
"btn btn-link" data-action=
"?pagination_offset=2" disabled=
"disabled">3</button>
249 <span
class=
"browse next">
250 <a
class=
"glyph disabled" aria-label=
"next" aria-
disabled=
"true">
251 <span
class=
"glyphicon glyphicon-chevron-right" aria-hidden=
"true"></span>
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)
◆ testRenderUnlimited()
PaginationTest::testRenderUnlimited |
( |
| ) |
|
Definition at line 87 of file PaginationTest.php.
References ILIAS_UI_TestBase\assertHTMLEquals(), disabled(), ILIAS_UI_TestBase\getDefaultRenderer(), and getFactory().
95 $expected_html = <<<EOT
96 <div
class=
"il-viewcontrol-pagination">
97 <span
class=
"browse previous">
98 <a
class=
"glyph disabled" aria-label=
"back" aria-
disabled=
"true">
99 <span
class=
"glyphicon glyphicon-chevron-left" aria-hidden=
"true"></span>
103 <button
class=
"btn btn-link" data-action=
"?pagination_offset=0" disabled=
"true">1</button>
104 <button
class=
"btn btn-link" data-action=
"?pagination_offset=1" id=
"id_1">2</button>
106 <span
class=
"browse next">
107 <a
class=
"glyph" href=
"?pagination_offset=1" aria-label=
"next">
108 <span
class=
"glyphicon glyphicon-chevron-right" aria-hidden=
"true"></span>
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)
◆ testRenderWithCurrentPage()
PaginationTest::testRenderWithCurrentPage |
( |
| ) |
|
Definition at line 118 of file PaginationTest.php.
References ILIAS_UI_TestBase\assertHTMLEquals(), disabled(), ILIAS_UI_TestBase\getDefaultRenderer(), and getFactory().
121 ->withTotalEntries(2)
123 ->withCurrentPage(1);
127 $expected_html = <<<EOT
128 <div
class=
"il-viewcontrol-pagination">
129 <span
class=
"browse previous">
130 <a
class=
"glyph" href=
"?pagination_offset=0" aria-label=
"back">
131 <span
class=
"glyphicon glyphicon-chevron-left" aria-hidden=
"true"></span>
135 <button
class=
"btn btn-link" data-action=
"?pagination_offset=0" id=
"id_1">1</button>
136 <button
class=
"btn btn-link" data-action=
"?pagination_offset=1" disabled=
"true">2</button>
138 <span
class=
"browse next">
139 <a
class=
"glyph disabled" aria-label=
"next" aria-
disabled=
"true">
140 <span
class=
"glyphicon glyphicon-chevron-right" aria-hidden=
"true"></span>
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)
The documentation for this class was generated from the following file: