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");
    46         $factory = $this->getFieldFactory();
    47         $url = $factory->link(
"Test Label", 
"Test Byline");
    49         $this->assertInstanceOf(Field\Link::class, 
$url);
    54         $factory = $this->getFieldFactory();
    55         $label = 
"Test Label";
    56         $byline = 
"Test Byline";
    57         $link = $factory->link($label, $byline)->withNameFrom($this->name_source);
    59         $f1 = $this->getFormWrappedHtml(
    62             '<input id="id_1" type="text" name="name_0/label_1" class="c-field-text" />',
    68         $f2 = $this->getFormWrappedHtml(
    71             '<input id="id_2" type="url" name="name_0/url_2" class="c-field-url" />',
    78         $expected = $this->getFormWrappedHtml(
    84         $this->assertEquals($expected, $this->render($link));
    89         $f = $this->getFieldFactory();
    91         $link = 
$f->link($label, null)->withNameFrom($this->name_source);
    93         $this->testWithError($link);
    94         $this->testWithNoByline($link);
    95         $this->testWithRequired($link);
    96         $this->testWithDisabled($link);
    97         $this->testWithAdditionalOnloadCodeRendersId($link);
   102         $f = $this->getFieldFactory();
   103         $input = 
$f->link(
"", 
"")
   104             ->withNameFrom(
new class () implements 
NameSource {
   105                 public function getNewName(): 
string   109                 public function getNewDedicatedName(): 
string   111                     return "dedicated_name";
   114         $input = $input->withInput(
new class () implements 
InputData {
   115             public function getOr($_, $default): 
string   119             public function get($_): 
string   123             public function has($name): 
bool   129         $result = $input->getContent();
   131         $this->assertNull($result->value());
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...