Definition at line 27 of file PasswordInputTest.php.
◆ buildFactory()
PasswordInputTest::buildFactory |
( |
| ) |
|
|
protected |
Definition at line 35 of file PasswordInputTest.php.
37 $df =
new Data\Factory();
38 $language = $this->createMock(\ilLanguage::class);
Class ChatMainBarProvider .
◆ setUp()
PasswordInputTest::setUp |
( |
| ) |
|
◆ test_implements_factory_interface()
PasswordInputTest::test_implements_factory_interface |
( |
| ) |
|
Definition at line 48 of file PasswordInputTest.php.
References Vendor\Package\$f.
51 $pwd =
$f->password(
"label",
"byline");
52 $this->assertInstanceOf(Field\Input::class, $pwd);
53 $this->assertInstanceOf(Field\Password::class, $pwd);
◆ test_render()
PasswordInputTest::test_render |
( |
| ) |
|
Definition at line 57 of file PasswordInputTest.php.
References Vendor\Package\$f, and $name.
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>"
assertHTMLEquals($expected_html_as_string, $html_as_string)
getDefaultRenderer(JavaScriptBinding $js_binding=null, $with_stub_renderings=[])
◆ test_render_disabled()
PasswordInputTest::test_render_disabled |
( |
| ) |
|
Definition at line 173 of file PasswordInputTest.php.
References Vendor\Package\$f, and $name.
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\" />"
assertHTMLEquals($expected_html_as_string, $html_as_string)
getDefaultRenderer(JavaScriptBinding $js_binding=null, $with_stub_renderings=[])
◆ test_render_error()
PasswordInputTest::test_render_error |
( |
| ) |
|
Definition at line 80 of file PasswordInputTest.php.
References Vendor\Package\$f, and $name.
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);
brutallyTrimHTML($html)
A more radical version of normalizeHTML.
getDefaultRenderer(JavaScriptBinding $js_binding=null, $with_stub_renderings=[])
◆ test_render_no_byline()
PasswordInputTest::test_render_no_byline |
( |
| ) |
|
Definition at line 105 of file PasswordInputTest.php.
References Vendor\Package\$f, and $name.
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\" />"
assertHTMLEquals($expected_html_as_string, $html_as_string)
getDefaultRenderer(JavaScriptBinding $js_binding=null, $with_stub_renderings=[])
◆ test_render_required()
PasswordInputTest::test_render_required |
( |
| ) |
|
Definition at line 148 of file PasswordInputTest.php.
References Vendor\Package\$f, and $name.
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\" />"
assertHTMLEquals($expected_html_as_string, $html_as_string)
getDefaultRenderer(JavaScriptBinding $js_binding=null, $with_stub_renderings=[])
◆ test_render_value()
PasswordInputTest::test_render_value |
( |
| ) |
|
Definition at line 126 of file PasswordInputTest.php.
References Vendor\Package\$f, and $name.
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\" />"
assertHTMLEquals($expected_html_as_string, $html_as_string)
getDefaultRenderer(JavaScriptBinding $js_binding=null, $with_stub_renderings=[])
◆ test_value_required()
PasswordInputTest::test_value_required |
( |
| ) |
|
Definition at line 196 of file PasswordInputTest.php.
References Vendor\Package\$f, and $name.
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());
◆ test_value_type()
PasswordInputTest::test_value_type |
( |
| ) |
|
Definition at line 212 of file PasswordInputTest.php.
References Vendor\Package\$f.
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());
The documentation for this class was generated from the following file: