3 declare(strict_types=1);
21 require_once(__DIR__ .
"/../../../../../libs/composer/vendor/autoload.php");
22 require_once(__DIR__ .
"/../../../Base.php");
23 require_once(__DIR__ .
"/InputTest.php");
42 $data_factory =
new Data\Factory();
43 $language = $this->createMock(ilLanguage::class);
44 return new I\Input\Field\Factory(
48 new Refinery($data_factory, $language),
59 $this->assertInstanceOf(Field\Url::class,
$url);
66 $label =
"Test Label";
67 $byline =
"Test Byline";
70 $url =
$factory->url($label, $byline)->withNameFrom($this->name_source);
73 $expected =
"<div class=\"form-group row\"> 74 <label for=\"$id\" class=\"control-label col-sm-4 col-md-3 col-lg-2\">$label</label> 75 <div class=\"col-sm-8 col-md-9 col-lg-10\"> 76 <input id=\"$id\" type=\"url\" name=\"$name\" class=\"form-control form-control-sm\" /> 77 <div class=\"help-block\">$byline</div> 90 $label =
"Test Label";
91 $byline =
"Test Byline";
94 $error =
"test_error";
95 $url =
$factory->url($label, $byline)->withNameFrom($this->name_source)
99 $expected =
"<div class=\"form-group row\"> 100 <label for=\"$id\" class=\"control-label col-sm-4 col-md-3 col-lg-2\">$label</label> 101 <div class=\"col-sm-8 col-md-9 col-lg-10\"> 102 <div class=\"help-block alert alert-danger\" aria-describedby=\"id_1\" role=\"alert\">$error</div> 103 <input id=\"$id\" type=\"url\" name=\"$name\" class=\"form-control form-control-sm\" /> 104 <div class=\"help-block\">$byline</div> 118 $label =
"Test Label";
121 $url =
$factory->url($label)->withNameFrom($this->name_source);
124 $expected =
"<div class=\"form-group row\"> 125 <label for=\"$id\" class=\"control-label col-sm-4 col-md-3 col-lg-2\">$label</label> 126 <div class=\"col-sm-8 col-md-9 col-lg-10\"> 127 <input id=\"$id\" type=\"url\" name=\"$name\" class=\"form-control form-control-sm\" /> 140 $label =
"Test Label";
141 $value =
"https://www.ilias.de/";
145 ->withNameFrom($this->name_source);
148 $expected =
"<div class=\"form-group row\"> 149 <label for=\"$id\" class=\"control-label col-sm-4 col-md-3 col-lg-2\">$label</label> 150 <div class=\"col-sm-8 col-md-9 col-lg-10\"> 151 <input id=\"$id\" type=\"url\" value=\"$value\" name=\"$name\" class=\"form-control form-control-sm\" /> 164 $label =
"Test Label";
167 $url =
$factory->url($label)->withNameFrom($this->name_source)
168 ->withRequired(
true);
171 $expected =
"<div class=\"form-group row\"> 172 <label for=\"$id\" class=\"control-label col-sm-4 col-md-3 col-lg-2\">$label<span class=\"asterisk\">*</span></label> 173 <div class=\"col-sm-8 col-md-9 col-lg-10\"> 174 <input id=\"$id\" type=\"url\" name=\"$name\" class=\"form-control form-control-sm\" /> 187 $label =
"Test Label";
190 $url =
$factory->url($label)->withNameFrom($this->name_source)
191 ->withDisabled(
true);
194 $expected =
"<div class=\"form-group row\"> 195 <label for=\"$id\" class=\"control-label col-sm-4 col-md-3 col-lg-2\">$label</label> 196 <div class=\"col-sm-8 col-md-9 col-lg-10\"> 197 <input id=\"$id\" type=\"url\" name=\"$name\" disabled=\"disabled\" class=\"form-control form-control-sm\" />
getDefaultRenderer(JavaScriptBinding $js_binding=null, array $with_stub_renderings=[])
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...
Class ChatMainBarProvider .
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
brutallyTrimHTML(string $html)
A more radical version of normalizeHTML.
Provides common functionality for UI tests.
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
normalizeHTML(string $html)