19 declare(strict_types=1);
    21 require_once(__DIR__ . 
"/../../../../../../../vendor/composer/vendor/autoload.php");
    22 require_once(__DIR__ . 
"/../../../Base.php");
    23 require_once(__DIR__ . 
"/InputTest.php");
    24 require_once(__DIR__ . 
"/CommonFieldRendering.php");
    39     public function get(
string $name): 
string    47     public function getOr(
string $name, $default): string
    49         return 'some alternative value';
    55     public function has($name): bool
    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);
    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));
   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);
   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));
   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());
   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());
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
Interface Observer  Contains several chained tasks and infos about them. 
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...