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(
81 new I\SignalGenerator(),
Interface Observer Contains several chained tasks and infos about them.
◆ buildLegacyFactory()
FilterInputTest::buildLegacyFactory |
( |
| ) |
|
|
protected |
Definition at line 102 of file FilterInputTest.php.
104 $mock = $this->createMock(
I\Legacy\Factory::class);
105 $mock->method(
'content')->willReturn(
106 new I\Legacy\Content(
'',
new I\SignalGenerator())
◆ buildPopoverFactory()
FilterInputTest::buildPopoverFactory |
( |
| ) |
|
|
protected |
◆ buildSymbolFactory()
FilterInputTest::buildSymbolFactory |
( |
| ) |
|
|
protected |
◆ getUIFactory()
FilterInputTest::getUIFactory |
( |
| ) |
|
◆ testRenderDateTimeWithDurationAndFilterContext()
FilterInputTest::testRenderDateTimeWithDurationAndFilterContext |
( |
| ) |
|
Definition at line 254 of file FilterInputTest.php.
References $datetime, $duration, Vendor\Package\$f, and null.
258 $duration = $if->duration(
'label',
'byline');
259 $datetime = $if->dateTime(
'label',
'byline');
260 $filter =
$f->standard(
"#",
"#",
"#",
"#",
"#",
"#", [], [],
false,
false);
262 $html = $this->brutallyTrimHTML($dr->render(
$datetime));
264 $expected = $this->brutallyTrimHTML(
' 265 <fieldset class="c-input" data-il-ui-component="" data-il-ui-input-name=""> 266 <label for="id_1">label</label> 267 <div class="c-input__field"> 268 <div class="c-input-group"> 269 <input id="id_1" type="date" class="c-field-datetime" /> 274 $this->assertEquals($expected, $html);
275 $this->assertHTMLEquals($expected, $html);
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
◆ testRenderDateTimeWithFilterContext()
FilterInputTest::testRenderDateTimeWithFilterContext |
( |
| ) |
|
Definition at line 227 of file FilterInputTest.php.
References $datetime, Vendor\Package\$f, and null.
231 $datetime = $if->dateTime(
'label',
'byline');
232 $filter =
$f->standard(
"#",
"#",
"#",
"#",
"#",
"#", [], [],
false,
false);
233 $fr = $this->getDefaultRenderer(
null, [], [$filter]);
234 $html = $this->brutallyTrimHTML($fr->render(
$datetime));
236 $expected = $this->brutallyTrimHTML(
' 237 <div class="col-md-6 col-lg-4 il-popover-container"> 238 <div class="input-group"> 239 <label for="id_1" class="input-group-addon leftaddon">label</label> 240 <div class="c-input-group"> 241 <input id="id_1" type="date" class="c-field-datetime" /> 243 <span class="input-group-addon rightaddon"> 244 <a class="glyph" href="" aria-label="remove" id="id_2"> 245 <span class="glyphicon glyphicon-minus-sign" aria-hidden="true"></span> 251 $this->assertHTMLEquals($expected, $html);
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
◆ testRenderDurationWithFilterContext()
FilterInputTest::testRenderDurationWithFilterContext |
( |
| ) |
|
Definition at line 278 of file FilterInputTest.php.
References $datetime, Vendor\Package\$f, and null.
282 $datetime = $if->duration(
'label',
'byline');
283 $filter =
$f->standard(
"#",
"#",
"#",
"#",
"#",
"#", [], [],
false,
false);
284 $fr = $this->getDefaultRenderer(
null, [], [$filter]);
285 $html = $this->brutallyTrimHTML($fr->render(
$datetime));
286 $label_start =
'duration_default_label_start';
287 $label_end =
'duration_default_label_end';
290 $expected = $this->brutallyTrimHTML(
' 291 <div class="col-md-6 col-lg-4 il-popover-container"> 292 <div class="input-group"> 293 <label class="input-group-addon leftaddon">label</label> 294 <span role="button" tabindex="0" class="form-control il-filter-field" id="id_7" data-placement="bottom"></span> 295 <div class="il-standard-popover-content" style="display:none;" id="id_5"></div> 296 <span class="input-group-addon rightaddon"> 297 <a class="glyph" href="" aria-label="remove" id="id_8"> 298 <span class="glyphicon glyphicon-minus-sign" aria-hidden="true"></span> 305 $this->assertHTMLEquals($expected, $html);
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
◆ testRenderMultiSelectWithFilterContext()
FilterInputTest::testRenderMultiSelectWithFilterContext |
( |
| ) |
|
Definition at line 199 of file FilterInputTest.php.
References Vendor\Package\$f, and null.
203 $options = [
"one" =>
"One",
"two" =>
"Two",
"three" =>
"Three"];
204 $multi = $if->multiSelect(
'label', $options,
'byline');
205 $filter =
$f->standard(
"#",
"#",
"#",
"#",
"#",
"#", [], [],
false,
false);
206 $fr = $this->getDefaultRenderer(
null, [], [$filter]);
207 $html = $this->brutallyTrimHTML($fr->render($multi));
209 $expected = $this->brutallyTrimHTML(
' 210 <div class="col-md-6 col-lg-4 il-popover-container"> 211 <div class="input-group"> 212 <label class="input-group-addon leftaddon">label</label> 213 <span role="button" tabindex="0" class="form-control il-filter-field" id="id_3" data-placement="bottom"></span> 214 <div class="il-standard-popover-content" style="display:none;" id="id_1"></div> 215 <span class="input-group-addon rightaddon"> 216 <a class="glyph" href="" aria-label="remove" id="id_4"> 217 <span class="glyphicon glyphicon-minus-sign" aria-hidden="true"></span> 224 $this->assertHTMLEquals($expected, $html);
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
◆ testRenderNumericWithFilterContext()
FilterInputTest::testRenderNumericWithFilterContext |
( |
| ) |
|
Definition at line 145 of file FilterInputTest.php.
References Vendor\Package\$f, and null.
149 $numeric = $if->numeric(
'label',
'byline');
150 $filter =
$f->standard(
"#",
"#",
"#",
"#",
"#",
"#", [], [],
false,
false);
151 $fr = $this->getDefaultRenderer(
null, [], [$filter]);
152 $html = $this->brutallyTrimHTML($fr->render($numeric));
154 $expected = $this->brutallyTrimHTML(
' 155 <div class="col-md-6 col-lg-4 il-popover-container"> 156 <div class="input-group"> 157 <label for="id_1" class="input-group-addon leftaddon">label</label> 158 <input id="id_1" type="number" step="1" class="c-field-number" /> 159 <span class="input-group-addon rightaddon"> 160 <a class="glyph" href="" aria-label="remove" id="id_2"> 161 <span class="glyphicon glyphicon-minus-sign" aria-hidden="true"></span> 167 $this->assertHTMLEquals($expected, $html);
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
◆ testRenderSelectWithFilterContext()
FilterInputTest::testRenderSelectWithFilterContext |
( |
| ) |
|
Definition at line 170 of file FilterInputTest.php.
References Vendor\Package\$f, and null.
174 $options = [
"one" =>
"One",
"two" =>
"Two",
"three" =>
"Three"];
175 $select = $if->select(
'label', $options,
'byline');
176 $filter =
$f->standard(
"#",
"#",
"#",
"#",
"#",
"#", [], [],
false,
false);
177 $fr = $this->getDefaultRenderer(
null, [], [$filter]);
178 $html = $this->brutallyTrimHTML($fr->render($select));
180 $expected = $this->brutallyTrimHTML(
' 181 <div class="col-md-6 col-lg-4 il-popover-container"> 182 <div class="input-group"> 183 <label for="id_1" class="input-group-addon leftaddon">label</label> 185 <option selected="selected" value="">-</option> 186 <option value="one">One</option> 187 <option value="two">Two</option> 188 <option value="three">Three</option> 190 <span class="input-group-addon rightaddon"> 191 <a class="glyph" href="" aria-label="remove" id="id_2"><span class="glyphicon glyphicon-minus-sign" aria-hidden="true"></span></a> 196 $this->assertHTMLEquals($expected, $html);
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
◆ testRenderTextWithFilterContext()
FilterInputTest::testRenderTextWithFilterContext |
( |
| ) |
|
Definition at line 120 of file FilterInputTest.php.
References Vendor\Package\$f, and null.
124 $text = $if->text(
'label',
'byline');
125 $filter =
$f->standard(
"#",
"#",
"#",
"#",
"#",
"#", [], [],
false,
false);
126 $fr = $this->getDefaultRenderer(
null, [], [$filter]);
127 $html = $this->brutallyTrimHTML($fr->render($text));
129 $expected = $this->brutallyTrimHTML(
' 130 <div class="col-md-6 col-lg-4 il-popover-container"> 131 <div class="input-group"> 132 <label for="id_1" class="input-group-addon leftaddon">label</label> 133 <input id="id_1" type="text" class="c-field-text" /> 134 <span class="input-group-addon rightaddon"> 135 <a class="glyph" href="" aria-label="remove" id="id_2"> 136 <span class="glyphicon glyphicon-minus-sign" aria-hidden="true"></span> 142 $this->assertHTMLEquals($expected, $html);
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
The documentation for this class was generated from the following file: