5require_once(__DIR__ .
"/../../../Base.php");
29 $language = $this->createMock(\ilLanguage::class);
33 new Refinery\
Factory($df, $language),
40 $options = [
"one" =>
"Eins",
"two" =>
"Zwei",
"three" =>
"Drei"];
42 $this->createMock(
ILIAS\Data\Factory::class),
43 $this->createMock(
ILIAS\Refinery\Factory::class),
49 $this->assertTrue($select->_isClientSideValueOk(
"one"));
50 $this->assertTrue($select->_isClientSideValueOk(
"two"));
51 $this->assertTrue($select->_isClientSideValueOk(
"three"));
52 $this->assertFalse($select->_isClientSideValueOk(
"four"));
59 $this->createMock(
ILIAS\Data\Factory::class),
60 $this->createMock(
ILIAS\Refinery\Factory::class),
66 $this->assertTrue($select->_isClientSideValueOk(
""));
73 $this->createMock(
ILIAS\Data\Factory::class),
74 $this->createMock(
ILIAS\Refinery\Factory::class),
78 ))->withRequired(
true);
80 $this->assertTrue($select->_isClientSideValueOk(
""));
88 $options = [
"one" =>
"One",
"two" =>
"Two",
"three" =>
"Three"];
89 $select =
$f->select($label, $options, $byline)->withNameFrom($this->name_source);
95<div class="form-group row">
96 <label for="id_1" class="control-label col-sm-3">label</label>
97 <div class="col-sm-9">
98 <select id="id_1" name="name_0">
99 <option selected="selected" value="">-</option>
100 <option value="one">One</option>
101 <option value="two">Two</option>
102 <option value="three">Three</option>
104 <div class="help-block">byline</div>
108 $this->assertEquals($expected, $html);
117 $options = [
"one" =>
"One",
"two" =>
"Two",
"three" =>
"Three"];
118 $select =
$f->select($label, $options, $byline)->withNameFrom($this->name_source)->withValue(
"one");
124<div class="form-group row">
125 <label for="id_1" class="control-label col-sm-3">label</label>
126 <div class="col-sm-9">
127 <select id="id_1" name="name_0">
128 <option value="">-</option>
129 <option selected="selected" value="one">One</option>
130 <option value="two">Two</option>
131 <option value="three">Three</option>
133 <div class="help-block">byline</div>
137 $this->assertEquals($expected, $html);
145 $options = [
"one" =>
"One",
"two" =>
"Two",
"three" =>
"Three"];
146 $select =
$f->select($label, $options, $byline)->withNameFrom($this->name_source)->withDisabled(
true);
152<div class="form-group row">
153 <label for="id_1" class="control-label col-sm-3">label</label>
154 <div class="col-sm-9">
155 <select id="id_1" name="name_0" disabled="disabled">
156 <option selected="selected" value="">-</option>
157 <option value="one">One</option>
158 <option value="two">Two</option>
159 <option value="three">Three</option>
161 <div class="help-block">byline</div>
165 $this->assertEquals($expected, $html);
An exception for terminatinating execution or to throw for unit testing.
Provides common functionality for UI tests.
getDefaultRenderer(JavaScriptBinding $js_binding=null, $with_stub_renderings=[])
brutallyTrimHTML($html)
A more radical version of normalizeHTML.
_isClientSideValueOk($value)
Class ChatMainBarProvider \MainMenu\Provider.