Definition at line 33 of file LinkInputTest.php.
◆ setUp()
◆ testCommonRendering()
LinkInputTest::testCommonRendering |
( |
| ) |
|
Definition at line 87 of file LinkInputTest.php.
References Vendor\Package\$f, and null.
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);
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
◆ testImplementsFactoryInterface()
LinkInputTest::testImplementsFactoryInterface |
( |
| ) |
|
Definition at line 44 of file LinkInputTest.php.
References $url.
46 $factory = $this->getFieldFactory();
47 $url = $factory->link(
"Test Label",
"Test Byline");
49 $this->assertInstanceOf(Field\Link::class,
$url);
◆ testProducesNullWhenNoDataExists()
LinkInputTest::testProducesNullWhenNoDataExists |
( |
| ) |
|
Definition at line 100 of file LinkInputTest.php.
References Vendor\Package\$f, and ILIAS\GlobalScreen\has().
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());
◆ testRendering()
LinkInputTest::testRendering |
( |
| ) |
|
Definition at line 52 of file LinkInputTest.php.
References null.
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));
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
◆ $name_source
The documentation for this class was generated from the following file: