Definition at line 61 of file PasswordInputTest.php.
◆ setUp()
PasswordInputTest::setUp |
( |
| ) |
|
◆ testCommonRendering()
PasswordInputTest::testCommonRendering |
( |
| ) |
|
Definition at line 101 of file PasswordInputTest.php.
References Vendor\Package\$f.
103 $f = $this->getFieldFactory();
105 $pwd =
$f->password($label)->withNameFrom($this->name_source);
107 $this->testWithError($pwd);
108 $this->testWithNoByline($pwd);
109 $this->testWithRequired($pwd);
110 $this->testWithDisabled($pwd);
111 $this->testWithAdditionalOnloadCodeRendersId($pwd);
◆ testImplementsFactoryInterface()
PasswordInputTest::testImplementsFactoryInterface |
( |
| ) |
|
Definition at line 72 of file PasswordInputTest.php.
References Vendor\Package\$f.
74 $f = $this->getFieldFactory();
75 $pwd =
$f->password(
"label",
"byline");
76 $this->assertInstanceOf(\
ILIAS\
UI\
Component\Input\Container\Form\FormInput::class, $pwd);
77 $this->assertInstanceOf(Field\Password::class, $pwd);
Interface Observer Contains several chained tasks and infos about them.
◆ testRender()
PasswordInputTest::testRender |
( |
| ) |
|
Definition at line 80 of file PasswordInputTest.php.
References Vendor\Package\$f.
82 $f = $this->getFieldFactory();
86 $pwd =
$f->password($label, $byline)->withNameFrom($this->name_source);
87 $expected = $this->getFormWrappedHtml(
88 'password-field-input',
91 <div class="c-field-password"> 92 <input id="id_1" type="password" name="' . $name .
'" autocomplete="off" /> 98 $this->assertEquals($expected, $this->render($pwd));
◆ testRenderValue()
PasswordInputTest::testRenderValue |
( |
| ) |
|
Definition at line 114 of file PasswordInputTest.php.
References Vendor\Package\$f, and null.
116 $f = $this->getFieldFactory();
120 $pwd =
$f->password($label)->withValue($value)->withNameFrom($this->name_source);
121 $expected = $this->getFormWrappedHtml(
122 'password-field-input',
125 <div class="c-field-password"> 126 <input id="id_1" type="password" name="' . $name .
'" value="' . $value .
'" autocomplete="off" /> 132 $this->assertEquals($expected, $this->render($pwd));
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
◆ testValueRequired()
PasswordInputTest::testValueRequired |
( |
| ) |
|
Definition at line 135 of file PasswordInputTest.php.
References Vendor\Package\$f.
137 $f = $this->getFieldFactory();
140 $pwd =
$f->password($label)->withNameFrom($this->name_source)->withRequired(
true);
142 $pwd1 = $pwd->withInput(
new DefInputData([$name =>
"0"]));
143 $value1 = $pwd1->getContent();
144 $this->assertTrue($value1->isOk());
146 $pwd2 = $pwd->withInput(
new DefInputData([$name =>
""]));
147 $value2 = $pwd2->getContent();
148 $this->assertTrue($value2->isError());
◆ testValueType()
PasswordInputTest::testValueType |
( |
| ) |
|
Definition at line 151 of file PasswordInputTest.php.
References Vendor\Package\$f, and $post.
153 $f = $this->getFieldFactory();
155 $pwd =
$f->password($label)->withNameFrom($this->name_source);
156 $this->assertNull($pwd->getValue());
159 $pwd = $pwd->withInput($post);
160 $this->assertEquals($post->getOr(
'',
''), $pwd->getValue());
161 $this->assertInstanceOf(PWD::class, $pwd->getContent()->value());
◆ $name_source
The documentation for this class was generated from the following file: