5require_once(__DIR__ .
"/../../../../../libs/composer/vendor/autoload.php");
6require_once(__DIR__ .
"/../../../Base.php");
7require_once(__DIR__ .
"/InputTest.php");
12use \ILIAS\UI\Component\Input\Field;
23 return 'some alternative value';
38 $language = $this->createMock(\ilLanguage::class);
51 $pwd =
$f->password(
"label",
"byline");
52 $this->assertInstanceOf(Field\Input::class, $pwd);
53 $this->assertInstanceOf(Field\Password::class, $pwd);
63 $pwd =
$f->password($label, $byline)->withNameFrom($this->name_source);
67 .
"<div class=\"form-group row\">"
68 .
"<label class=\"control-label col-sm-3\">$label</label>"
69 .
"<div class=\"col-sm-9\">"
70 .
"<div class=\"il-input-password\" id=\"id_1\">"
71 .
"<input type=\"password\" name=\"$name\" class=\"form-control form-control-sm\" />"
73 .
"<div class=\"help-block\">$byline</div>"
87 $pwd =
$f->password($label, $byline)->withNameFrom($this->name_source)->withError($error);
92<div class="form-group row">
93 <label class="control-label col-sm-3">label</label>
94 <div class="col-sm-9">
95 <div class="help-block alert alert-danger" role="alert">an_error</div>
96 <div class="il-input-password" id="id_1"><input type="password" name="name_0" class="form-control form-control-sm" /></div>
97 <div class="help-block">byline</div>
101 $this->assertEquals($expected, $html);
110 $pwd =
$f->password($label)->withNameFrom($this->name_source);
114 .
"<div class=\"form-group row\">"
115 .
"<label class=\"control-label col-sm-3\">$label</label>"
116 .
"<div class=\"col-sm-9\">"
117 .
"<div class=\"il-input-password\" id=\"id_1\">"
118 .
"<input type=\"password\" name=\"$name\" class=\"form-control form-control-sm\" />"
132 $pwd =
$f->password($label)->withValue($value)->withNameFrom($this->name_source);
136 .
"<div class=\"form-group row\">"
137 .
"<label class=\"control-label col-sm-3\">$label</label>"
138 .
"<div class=\"col-sm-9\">"
139 .
"<div class=\"il-input-password\" id=\"id_1\">"
140 .
"<input type=\"password\" name=\"$name\" value=\"$value\" class=\"form-control form-control-sm\" />"
153 $pwd =
$f->password($label)->withNameFrom($this->name_source)->withRequired(
true);
156 $html = $r->render($pwd);
159 .
"<div class=\"form-group row\">"
160 .
"<label class=\"control-label col-sm-3\">" .
"$label"
161 .
"<span class=\"asterisk\">*</span>"
163 .
"<div class=\"col-sm-9\">"
164 .
"<div class=\"il-input-password\" id=\"id_1\">"
165 .
"<input type=\"password\" name=\"$name\" class=\"form-control form-control-sm\" />"
178 $pwd =
$f->password($label)->withNameFrom($this->name_source)->withDisabled(
true);
181 $html = $r->render($pwd);
184 .
"<div class=\"form-group row\">"
185 .
"<label class=\"control-label col-sm-3\">$label</label>"
186 .
"<div class=\"col-sm-9\">"
187 .
"<div class=\"il-input-password\" id=\"id_1\">"
188 .
"<input type=\"password\" name=\"$name\" disabled=\"disabled\" class=\"form-control form-control-sm\" />"
201 $pwd =
$f->password($label)->withNameFrom($this->name_source)->withRequired(
true);
204 $value1 = $pwd1->getContent();
205 $this->assertTrue($value1->isOk());
208 $value2 = $pwd2->getContent();
209 $this->assertTrue($value2->isError());
216 $pwd =
$f->password($label)->withNameFrom($this->name_source);
217 $this->assertNull($pwd->getValue());
220 $pwd = $pwd->withInput($post);
221 $this->assertEquals($post->getOr(
'',
''), $pwd->getValue());
222 $this->assertInstanceOf(PWD::class, $pwd->getContent()->value());
An exception for terminatinating execution or to throw for unit testing.
A password is used as part of credentials for authentication.
Provides common functionality for UI tests.
assertHTMLEquals($expected_html_as_string, $html_as_string)
getDefaultRenderer(JavaScriptBinding $js_binding=null, $with_stub_renderings=[])
brutallyTrimHTML($html)
A more radical version of normalizeHTML.
Class ChatMainBarProvider \MainMenu\Provider.