Definition at line 32 of file UrlInputTest.php.
◆ setUp()
◆ testCommonRendering()
UrlInputTest::testCommonRendering |
( |
| ) |
|
Definition at line 86 of file UrlInputTest.php.
86 : void
87 {
88 $f = $this->getFieldFactory();
89 $url =
$f->url(
'label',
null)->withNameFrom($this->name_source);
90
91 $this->testWithError(
$url);
92 $this->testWithNoByline(
$url);
93 $this->testWithRequired(
$url);
94 $this->testWithDisabled(
$url);
95 $this->testWithAdditionalOnloadCodeRendersId(
$url);
96 }
References Vendor\Package\$f, and $url.
◆ testImplementsFactoryInterface()
UrlInputTest::testImplementsFactoryInterface |
( |
| ) |
|
Definition at line 43 of file UrlInputTest.php.
43 : void
44 {
45 $factory = $this->getFieldFactory();
46 $url = $factory->url(
"Test Label",
"Test Byline");
47
48 $this->assertInstanceOf(\
ILIAS\UI\
Component\Input\Container\Form\FormInput::class,
$url);
49 $this->assertInstanceOf(Field\Url::class,
$url);
50 }
Interface Observer \BackgroundTasks Contains several chained tasks and infos about them.
References $url.
◆ testRendering()
UrlInputTest::testRendering |
( |
| ) |
|
Definition at line 52 of file UrlInputTest.php.
52 : void
53 {
54 $factory = $this->getFieldFactory();
56 $label = "Test Label";
57 $byline = "Test Byline";
58 $url = $factory->url($label, $byline)->withNameFrom($this->name_source);
59 $expected = $this->getFormWrappedHtml(
60 'url-field-input',
61 $label,
62 '<input id="id_1" type="url" name="name_0" class="c-field-url" />',
63 $byline,
64 'id_1'
65 );
66 $this->assertEquals($expected, $this->render(
$url));
67 }
References $renderer, and $url.
◆ testRenderValue()
UrlInputTest::testRenderValue |
( |
| ) |
|
Definition at line 69 of file UrlInputTest.php.
69 : void
70 {
71 $factory = $this->getFieldFactory();
72 $label = "Test Label";
73 $value = "https://www.ilias.de/";
74 $url = $factory->url($label)->withValue($value)
75 ->withNameFrom($this->name_source);
76 $expected = $this->getFormWrappedHtml(
77 'url-field-input',
78 $label,
79 '<input id="id_1" type="url" value="https://www.ilias.de/" name="name_0" class="c-field-url" />',
80 null,
81 'id_1'
82 );
83 $this->assertEquals($expected, $this->render(
$url));
84 }
References $url.
◆ $name_source
The documentation for this class was generated from the following file: