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 for=\"$name\" class=\"control-label col-sm-3\">$label</label>" 69 .
"<div class=\"col-sm-9\">" 70 .
"<div class=\"il-input-password\">" 71 .
"<input type=\"password\" name=\"$name\" class=\"form-control form-control-sm\" />" 73 .
"<div class=\"help-block\">$byline</div>" getDefaultRenderer(JavaScriptBinding $js_binding=null)
assertHTMLEquals($expected_html_as_string, $html_as_string)
◆ test_render_disabled()
PasswordInputTest::test_render_disabled |
( |
| ) |
|
Definition at line 182 of file PasswordInputTest.php.
References Vendor\Package\$f, and $name.
187 $pwd =
$f->password($label)->withNameFrom($this->name_source)->withDisabled(
true);
190 $html = $r->render($pwd);
193 .
"<div class=\"form-group row\">" 194 .
"<label for=\"$name\" class=\"control-label col-sm-3\">$label</label>" 195 .
"<div class=\"col-sm-9\">" 196 .
"<div class=\"il-input-password\">" 197 .
"<input type=\"password\" name=\"$name\" disabled=\"disabled\" class=\"form-control form-control-sm\" />" getDefaultRenderer(JavaScriptBinding $js_binding=null)
assertHTMLEquals($expected_html_as_string, $html_as_string)
◆ 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 for=\"$name\" class=\"control-label col-sm-3\">$label</label>" 94 .
" <div class=\"col-sm-9\">" 95 .
" <div class=\"il-input-password\">" 96 .
" <input type=\"password\" name=\"$name\" class=\"form-control form-control-sm\" />" 98 .
" <div class=\"help-block\">$byline</div>" 99 .
" <div class=\"help-block alert alert-danger\" role=\"alert\">" 100 .
" <img border=\"0\" src=\"./templates/default/images/icon_alert.svg\" alt=\"alert\" />" 106 $html = preg_replace(
'!\s+!',
' ', $html);
107 $expected = preg_replace(
'!\s+!',
' ', $expected);
108 $html = explode(
' ', $html);
109 $expected = explode(
' ', $expected);
110 $this->assertEquals($expected, $html);
getDefaultRenderer(JavaScriptBinding $js_binding=null)
◆ test_render_no_byline()
PasswordInputTest::test_render_no_byline |
( |
| ) |
|
Definition at line 114 of file PasswordInputTest.php.
References Vendor\Package\$f, and $name.
119 $pwd =
$f->password($label)->withNameFrom($this->name_source);
123 .
"<div class=\"form-group row\">" 124 .
"<label for=\"$name\" class=\"control-label col-sm-3\">$label</label>" 125 .
"<div class=\"col-sm-9\">" 126 .
"<div class=\"il-input-password\">" 127 .
"<input type=\"password\" name=\"$name\" class=\"form-control form-control-sm\" />" getDefaultRenderer(JavaScriptBinding $js_binding=null)
assertHTMLEquals($expected_html_as_string, $html_as_string)
◆ test_render_required()
PasswordInputTest::test_render_required |
( |
| ) |
|
Definition at line 157 of file PasswordInputTest.php.
References Vendor\Package\$f, and $name.
162 $pwd =
$f->password($label)->withNameFrom($this->name_source)->withRequired(
true);
165 $html = $r->render($pwd);
168 .
"<div class=\"form-group row\">" 169 .
"<label for=\"$name\" class=\"control-label col-sm-3\">" .
"$label" 170 .
"<span class=\"asterisk\">*</span>" 172 .
"<div class=\"col-sm-9\">" 173 .
"<div class=\"il-input-password\">" 174 .
"<input type=\"password\" name=\"$name\" class=\"form-control form-control-sm\" />" getDefaultRenderer(JavaScriptBinding $js_binding=null)
assertHTMLEquals($expected_html_as_string, $html_as_string)
◆ test_render_value()
PasswordInputTest::test_render_value |
( |
| ) |
|
Definition at line 135 of file PasswordInputTest.php.
References Vendor\Package\$f, and $name.
141 $pwd =
$f->password($label)->withValue($value)->withNameFrom($this->name_source);
145 .
"<div class=\"form-group row\">" 146 .
"<label for=\"$name\" class=\"control-label col-sm-3\">$label</label>" 147 .
"<div class=\"col-sm-9\">" 148 .
"<div class=\"il-input-password\">" 149 .
"<input type=\"password\" name=\"$name\" value=\"$value\" class=\"form-control form-control-sm\" />" getDefaultRenderer(JavaScriptBinding $js_binding=null)
assertHTMLEquals($expected_html_as_string, $html_as_string)
◆ test_value_required()
PasswordInputTest::test_value_required |
( |
| ) |
|
Definition at line 205 of file PasswordInputTest.php.
References Vendor\Package\$f, and $name.
210 $pwd =
$f->password($label)->withNameFrom($this->name_source)->withRequired(
true);
213 $value1 = $pwd1->getContent();
214 $this->assertTrue($value1->isOk());
217 $value2 = $pwd2->getContent();
218 $this->assertTrue($value2->isError());
◆ test_value_type()
PasswordInputTest::test_value_type |
( |
| ) |
|
Definition at line 221 of file PasswordInputTest.php.
References Vendor\Package\$f.
225 $pwd =
$f->password($label)->withNameFrom($this->name_source);
226 $this->assertNull($pwd->getValue());
229 $pwd = $pwd->withInput($post);
230 $this->assertEquals($post->getOr(
'',
''), $pwd->getValue());
231 $this->assertInstanceOf(PWD::class, $pwd->getContent()->value());
The documentation for this class was generated from the following file: