Test on rendering filter inputs.
More...
Test on rendering filter inputs.
Definition at line 64 of file FilterInputTest.php.
◆ buildFactory()
| FilterInputTest::buildFactory |
( |
| ) |
|
|
protected |
Definition at line 66 of file FilterInputTest.php.
66 : I\Input\Container\Filter\Factory
68 return new I\Input\Container\Filter\Factory(
69 new I\SignalGenerator(),
◆ buildInputFactory()
| FilterInputTest::buildInputFactory |
( |
| ) |
|
|
protected |
Definition at line 74 of file FilterInputTest.php.
74 : I\Input\Field\Factory
76 $df =
new Data\Factory();
77 $language = $this->createMock(
ILIAS\Language\Language::class);
78 return new I\Input\Field\Factory(
80 new I\SignalGenerator(),
Interface Observer Contains several chained tasks and infos about them.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
◆ buildLegacyFactory()
| FilterInputTest::buildLegacyFactory |
( |
| ) |
|
|
protected |
◆ buildPopoverFactory()
| FilterInputTest::buildPopoverFactory |
( |
| ) |
|
|
protected |
◆ buildSymbolFactory()
| FilterInputTest::buildSymbolFactory |
( |
| ) |
|
|
protected |
◆ getUIFactory()
| FilterInputTest::getUIFactory |
( |
| ) |
|
◆ testRenderDateTimeWithDurationAndFilterContext()
| FilterInputTest::testRenderDateTimeWithDurationAndFilterContext |
( |
| ) |
|
Definition at line 249 of file FilterInputTest.php.
References $datetime, $duration, and Vendor\Package\$f.
253 $duration = $if->duration(
'label',
'byline');
254 $datetime = $if->dateTime(
'label',
'byline');
255 $filter =
$f->standard(
"#",
"#",
"#",
"#",
"#",
"#", [], [],
false,
false);
257 $html = $this->brutallyTrimHTML($dr->render(
$datetime));
259 $expected = $this->brutallyTrimHTML(
' 260 <fieldset class="c-input" data-il-ui-component="" data-il-ui-input-name=""> 261 <label for="id_1">label</label> 262 <div class="c-input__field"> 263 <div class="c-input-group"> 264 <input id="id_1" type="date" class="c-field-datetime" /> 269 $this->assertEquals($expected, $html);
270 $this->assertHTMLEquals($expected, $html);
◆ testRenderDateTimeWithFilterContext()
| FilterInputTest::testRenderDateTimeWithFilterContext |
( |
| ) |
|
Definition at line 222 of file FilterInputTest.php.
References $datetime, and Vendor\Package\$f.
226 $datetime = $if->dateTime(
'label',
'byline');
227 $filter =
$f->standard(
"#",
"#",
"#",
"#",
"#",
"#", [], [],
false,
false);
228 $fr = $this->getDefaultRenderer(null, [], [$filter]);
229 $html = $this->brutallyTrimHTML($fr->render(
$datetime));
231 $expected = $this->brutallyTrimHTML(
' 232 <div class="col-md-6 col-lg-4 il-popover-container"> 233 <div class="input-group"> 234 <label for="id_1" class="input-group-addon leftaddon">label</label> 235 <div class="c-input-group"> 236 <input id="id_1" type="date" class="c-field-datetime" /> 238 <span class="input-group-addon rightaddon"> 239 <a class="glyph" href="" aria-label="remove" id="id_2"> 240 <span class="glyphicon glyphicon-minus-sign" aria-hidden="true"></span> 246 $this->assertHTMLEquals($expected, $html);
◆ testRenderDurationWithFilterContext()
| FilterInputTest::testRenderDurationWithFilterContext |
( |
| ) |
|
Definition at line 273 of file FilterInputTest.php.
References $datetime, and Vendor\Package\$f.
277 $datetime = $if->duration(
'label',
'byline');
278 $filter =
$f->standard(
"#",
"#",
"#",
"#",
"#",
"#", [], [],
false,
false);
279 $fr = $this->getDefaultRenderer(null, [], [$filter]);
280 $html = $this->brutallyTrimHTML($fr->render(
$datetime));
281 $label_start =
'duration_default_label_start';
282 $label_end =
'duration_default_label_end';
285 $expected = $this->brutallyTrimHTML(
' 286 <div class="col-md-6 col-lg-4 il-popover-container"> 287 <div class="input-group"> 288 <label class="input-group-addon leftaddon">label</label> 289 <span role="button" tabindex="0" class="form-control il-filter-field" id="id_7" data-placement="bottom"></span> 290 <div class="il-standard-popover-content" style="display:none;" id="id_5"></div> 291 <span class="input-group-addon rightaddon"> 292 <a class="glyph" href="" aria-label="remove" id="id_8"> 293 <span class="glyphicon glyphicon-minus-sign" aria-hidden="true"></span> 300 $this->assertHTMLEquals($expected, $html);
◆ testRenderMultiSelectWithFilterContext()
| FilterInputTest::testRenderMultiSelectWithFilterContext |
( |
| ) |
|
Definition at line 194 of file FilterInputTest.php.
References Vendor\Package\$f.
198 $options = [
"one" =>
"One",
"two" =>
"Two",
"three" =>
"Three"];
199 $multi = $if->multiSelect(
'label', $options,
'byline');
200 $filter =
$f->standard(
"#",
"#",
"#",
"#",
"#",
"#", [], [],
false,
false);
201 $fr = $this->getDefaultRenderer(null, [], [$filter]);
202 $html = $this->brutallyTrimHTML($fr->render($multi));
204 $expected = $this->brutallyTrimHTML(
' 205 <div class="col-md-6 col-lg-4 il-popover-container"> 206 <div class="input-group"> 207 <label class="input-group-addon leftaddon">label</label> 208 <span role="button" tabindex="0" class="form-control il-filter-field" id="id_3" data-placement="bottom"></span> 209 <div class="il-standard-popover-content" style="display:none;" id="id_1"></div> 210 <span class="input-group-addon rightaddon"> 211 <a class="glyph" href="" aria-label="remove" id="id_4"> 212 <span class="glyphicon glyphicon-minus-sign" aria-hidden="true"></span> 219 $this->assertHTMLEquals($expected, $html);
◆ testRenderNumericWithFilterContext()
| FilterInputTest::testRenderNumericWithFilterContext |
( |
| ) |
|
Definition at line 140 of file FilterInputTest.php.
References Vendor\Package\$f.
144 $numeric = $if->numeric(
'label',
'byline');
145 $filter =
$f->standard(
"#",
"#",
"#",
"#",
"#",
"#", [], [],
false,
false);
146 $fr = $this->getDefaultRenderer(null, [], [$filter]);
147 $html = $this->brutallyTrimHTML($fr->render($numeric));
149 $expected = $this->brutallyTrimHTML(
' 150 <div class="col-md-6 col-lg-4 il-popover-container"> 151 <div class="input-group"> 152 <label for="id_1" class="input-group-addon leftaddon">label</label> 153 <input id="id_1" type="number" class="c-field-number" /> 154 <span class="input-group-addon rightaddon"> 155 <a class="glyph" href="" aria-label="remove" id="id_2"> 156 <span class="glyphicon glyphicon-minus-sign" aria-hidden="true"></span> 162 $this->assertHTMLEquals($expected, $html);
◆ testRenderSelectWithFilterContext()
| FilterInputTest::testRenderSelectWithFilterContext |
( |
| ) |
|
Definition at line 165 of file FilterInputTest.php.
References Vendor\Package\$f.
169 $options = [
"one" =>
"One",
"two" =>
"Two",
"three" =>
"Three"];
170 $select = $if->select(
'label', $options,
'byline');
171 $filter =
$f->standard(
"#",
"#",
"#",
"#",
"#",
"#", [], [],
false,
false);
172 $fr = $this->getDefaultRenderer(null, [], [$filter]);
173 $html = $this->brutallyTrimHTML($fr->render($select));
175 $expected = $this->brutallyTrimHTML(
' 176 <div class="col-md-6 col-lg-4 il-popover-container"> 177 <div class="input-group"> 178 <label for="id_1" class="input-group-addon leftaddon">label</label> 180 <option selected="selected" value="">-</option> 181 <option value="one">One</option> 182 <option value="two">Two</option> 183 <option value="three">Three</option> 185 <span class="input-group-addon rightaddon"> 186 <a class="glyph" href="" aria-label="remove" id="id_2"><span class="glyphicon glyphicon-minus-sign" aria-hidden="true"></span></a> 191 $this->assertHTMLEquals($expected, $html);
◆ testRenderTextWithFilterContext()
| FilterInputTest::testRenderTextWithFilterContext |
( |
| ) |
|
Definition at line 115 of file FilterInputTest.php.
References Vendor\Package\$f, and $text.
119 $text = $if->text(
'label',
'byline');
120 $filter =
$f->standard(
"#",
"#",
"#",
"#",
"#",
"#", [], [],
false,
false);
121 $fr = $this->getDefaultRenderer(null, [], [$filter]);
122 $html = $this->brutallyTrimHTML($fr->render(
$text));
124 $expected = $this->brutallyTrimHTML(
' 125 <div class="col-md-6 col-lg-4 il-popover-container"> 126 <div class="input-group"> 127 <label for="id_1" class="input-group-addon leftaddon">label</label> 128 <input id="id_1" type="text" class="c-field-text" /> 129 <span class="input-group-addon rightaddon"> 130 <a class="glyph" href="" aria-label="remove" id="id_2"> 131 <span class="glyphicon glyphicon-minus-sign" aria-hidden="true"></span> 137 $this->assertHTMLEquals($expected, $html);
The documentation for this class was generated from the following file: