Definition at line 60 of file PasswordInputTest.php.
◆ buildFactory()
PasswordInputTest::buildFactory |
( |
| ) |
|
|
protected |
Definition at line 69 of file PasswordInputTest.php.
69 : I\Input\Field\Factory
71 $df =
new Data\Factory();
72 $language = $this->createMock(ilLanguage::class);
73 return new I\Input\Field\Factory(
Class ChatMainBarProvider .
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
◆ setUp()
PasswordInputTest::setUp |
( |
| ) |
|
◆ test_implements_factory_interface()
PasswordInputTest::test_implements_factory_interface |
( |
| ) |
|
Definition at line 82 of file PasswordInputTest.php.
References Vendor\Package\$f.
85 $pwd =
$f->password(
"label",
"byline");
87 $this->assertInstanceOf(Field\Password::class, $pwd);
Class ChatMainBarProvider .
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
◆ test_render()
PasswordInputTest::test_render |
( |
| ) |
|
Definition at line 90 of file PasswordInputTest.php.
References Vendor\Package\$f, and $name.
96 $pwd =
$f->password($label, $byline)->withNameFrom($this->name_source);
100 <div class="form-group row"> 101 <label for="id_1" class="control-label col-sm-4 col-md-3 col-lg-2">' . $label .
'</label> 102 <div class="col-sm-8 col-md-9 col-lg-10"> 103 <div class="il-input-password" id="id_1_container"> 104 <input id="id_1" type="password" name="' .
$name .
'" class="form-control form-control-sm" /> 106 <div class="help-block">' . $byline .
'</div> getDefaultRenderer(JavaScriptBinding $js_binding=null, array $with_stub_renderings=[])
assertHTMLEquals(string $expected_html_as_string, string $html_as_string)
◆ test_render_disabled()
PasswordInputTest::test_render_disabled |
( |
| ) |
|
Definition at line 198 of file PasswordInputTest.php.
References Vendor\Package\$f, and $name.
203 $pwd =
$f->password($label)->withNameFrom($this->name_source)->withDisabled(
true);
206 $html = $r->render($pwd);
209 <div class="form-group row"> 210 <label for="id_1" class="control-label col-sm-4 col-md-3 col-lg-2">' . $label .
'</label> 211 <div class="col-sm-8 col-md-9 col-lg-10"> 212 <div class="il-input-password" id="id_1_container"> 213 <input id="id_1" type="password" name="' .
$name .
'" disabled="disabled" class="form-control form-control-sm" /> getDefaultRenderer(JavaScriptBinding $js_binding=null, array $with_stub_renderings=[])
assertHTMLEquals(string $expected_html_as_string, string $html_as_string)
◆ test_render_error()
PasswordInputTest::test_render_error |
( |
| ) |
|
Definition at line 112 of file PasswordInputTest.php.
References Vendor\Package\$f.
118 $pwd =
$f->password($label, $byline)->withNameFrom($this->name_source)->withError($error);
123 <div class="form-group row"> 124 <label for="id_1" class="control-label col-sm-4 col-md-3 col-lg-2">label</label> 125 <div class="col-sm-8 col-md-9 col-lg-10"> 126 <div class="help-block alert alert-danger" aria-describedby="id_1" role="alert">an_error</div> 127 <div class="il-input-password" id="id_1_container"><input id="id_1" type="password" name="name_0" class="form-control form-control-sm" /></div> 128 <div class="help-block">byline</div> 132 $this->assertEquals($expected, $html);
getDefaultRenderer(JavaScriptBinding $js_binding=null, array $with_stub_renderings=[])
brutallyTrimHTML(string $html)
A more radical version of normalizeHTML.
◆ test_render_no_byline()
PasswordInputTest::test_render_no_byline |
( |
| ) |
|
Definition at line 135 of file PasswordInputTest.php.
References Vendor\Package\$f, and $name.
140 $pwd =
$f->password($label)->withNameFrom($this->name_source);
144 <div class="form-group row"> 145 <label for="id_1" class="control-label col-sm-4 col-md-3 col-lg-2">' . $label .
'</label> 146 <div class="col-sm-8 col-md-9 col-lg-10"> 147 <div class="il-input-password" id="id_1_container"> 148 <input id="id_1" type="password" name="' .
$name .
'" class="form-control form-control-sm" /> getDefaultRenderer(JavaScriptBinding $js_binding=null, array $with_stub_renderings=[])
assertHTMLEquals(string $expected_html_as_string, string $html_as_string)
◆ test_render_required()
PasswordInputTest::test_render_required |
( |
| ) |
|
Definition at line 176 of file PasswordInputTest.php.
References Vendor\Package\$f, and $name.
181 $pwd =
$f->password($label)->withNameFrom($this->name_source)->withRequired(
true);
184 $html = $r->render($pwd);
187 <div class="form-group row"> 188 <label for="id_1" class="control-label col-sm-4 col-md-3 col-lg-2">' . $label .
'<span class="asterisk">*</span></label> 189 <div class="col-sm-8 col-md-9 col-lg-10"> 190 <div class="il-input-password" id="id_1_container"> 191 <input id="id_1" type="password" name="' .
$name .
'" class="form-control form-control-sm" /> getDefaultRenderer(JavaScriptBinding $js_binding=null, array $with_stub_renderings=[])
assertHTMLEquals(string $expected_html_as_string, string $html_as_string)
◆ test_render_value()
PasswordInputTest::test_render_value |
( |
| ) |
|
Definition at line 155 of file PasswordInputTest.php.
References Vendor\Package\$f, and $name.
161 $pwd =
$f->password($label)->withValue($value)->withNameFrom($this->name_source);
165 <div class="form-group row"> 166 <label for="id_1" class="control-label col-sm-4 col-md-3 col-lg-2">' . $label .
'</label> 167 <div class="col-sm-8 col-md-9 col-lg-10"> 168 <div class="il-input-password" id="id_1_container"> 169 <input id="id_1" type="password" name="' .
$name .
'" value="' . $value .
'" class="form-control form-control-sm" /> getDefaultRenderer(JavaScriptBinding $js_binding=null, array $with_stub_renderings=[])
assertHTMLEquals(string $expected_html_as_string, string $html_as_string)
◆ test_value_required()
PasswordInputTest::test_value_required |
( |
| ) |
|
Definition at line 220 of file PasswordInputTest.php.
References Vendor\Package\$f, and $name.
225 $pwd =
$f->password($label)->withNameFrom($this->name_source)->withRequired(
true);
228 $value1 = $pwd1->getContent();
229 $this->assertTrue($value1->isOk());
232 $value2 = $pwd2->getContent();
233 $this->assertTrue($value2->isError());
◆ test_value_type()
PasswordInputTest::test_value_type |
( |
| ) |
|
Definition at line 236 of file PasswordInputTest.php.
References Vendor\Package\$f, and $post.
240 $pwd =
$f->password($label)->withNameFrom($this->name_source);
241 $this->assertNull($pwd->getValue());
244 $pwd = $pwd->withInput($post);
245 $this->assertEquals($post->getOr(
'',
''), $pwd->getValue());
246 $this->assertInstanceOf(PWD::class, $pwd->getContent()->value());
◆ $name_source
The documentation for this class was generated from the following file: