3declare(strict_types=1);
21require_once(__DIR__ .
"/../../../Base.php");
49 $language = $this->createMock(ilLanguage::class);
50 return new I\Input\Field\Factory(
54 new Refinery($df, $language),
61 $options = [
"one" =>
"Eins",
"two" =>
"Zwei",
"three" =>
"Drei"];
63 $this->createMock(
ILIAS\Data\Factory::class),
64 $this->createMock(
ILIAS\Refinery\Factory::class),
70 $this->assertTrue($select->_isClientSideValueOk(
"one"));
71 $this->assertTrue($select->_isClientSideValueOk(
"two"));
72 $this->assertTrue($select->_isClientSideValueOk(
"three"));
73 $this->assertFalse($select->_isClientSideValueOk(
"four"));
80 $this->createMock(
ILIAS\Data\Factory::class),
81 $this->createMock(
ILIAS\Refinery\Factory::class),
87 $this->assertTrue($select->_isClientSideValueOk(
""));
99 ->withNameFrom($this->name_source);
101 $data = $this->createMock(InputData::class);
102 $data->expects($this->once())
105 $select = $select->withInput(
109 $this->assertNotEquals(
null, $select->getError());
116 $this->createMock(
ILIAS\Data\Factory::class),
117 $this->createMock(
ILIAS\Refinery\Factory::class),
121 ))->withRequired(
true);
123 $this->assertTrue($select->_isClientSideValueOk(
""));
131 $options = [
"one" =>
"One",
"two" =>
"Two",
"three" =>
"Three"];
132 $select =
$f->select($label, $options, $byline)->withNameFrom($this->name_source);
138<div class="form-group row">
139 <label for="id_1" class="control-label col-sm-4 col-md-3 col-lg-2">label</label>
140 <div class="col-sm-8 col-md-9 col-lg-10">
141 <select id="id_1" name="name_0">
142 <option selected="selected" value="">-</option>
143 <option value="one">One</option>
144 <option value="two">Two</option>
145 <option value="three">Three</option>
147 <div class="help-block">byline</div>
151 $this->assertEquals($expected, $html);
160 $options = [
"one" =>
"One",
"two" =>
"Two",
"three" =>
"Three"];
161 $select =
$f->select($label, $options, $byline)->withNameFrom($this->name_source)->withValue(
"one");
167<div class="form-group row">
168 <label for="id_1" class="control-label col-sm-4 col-md-3 col-lg-2">label</label>
169 <div class="col-sm-8 col-md-9 col-lg-10">
170 <select id="id_1" name="name_0">
171 <option value="">-</option>
172 <option selected="selected" value="one">One</option>
173 <option value="two">Two</option>
174 <option value="three">Three</option>
176 <div class="help-block">byline</div>
180 $this->assertEquals($expected, $html);
188 $options = [
"one" =>
"One",
"two" =>
"Two",
"three" =>
"Three"];
189 $select =
$f->select($label, $options, $byline)->withNameFrom($this->name_source)->withDisabled(
true);
195<div class="form-group row">
196 <label for="id_1" class="control-label col-sm-4 col-md-3 col-lg-2">label</label>
197 <div class="col-sm-8 col-md-9 col-lg-10">
198 <select id="id_1" name="name_0" disabled="disabled">
199 <option selected="selected" value="">-</option>
200 <option value="one">One</option>
201 <option value="two">Two</option>
202 <option value="three">Three</option>
204 <div class="help-block">byline</div>
208 $this->assertEquals($expected, $html);
Provides common functionality for UI tests.
brutallyTrimHTML(string $html)
A more radical version of normalizeHTML.
getDefaultRenderer(JavaScriptBinding $js_binding=null, array $with_stub_renderings=[])
_isClientSideValueOk($value)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Class ChatMainBarProvider \MainMenu\Provider.