19 declare(strict_types=1);
21 require_once
'components/ILIAS/UI/tests/AbstractFactoryTestCase.php';
47 "switchableGroup" => [
67 public static string $factory_title =
'ILIAS\\UI\\Component\\Input\\Field\\Factory';
72 $df =
new Data\Factory();
73 $language = $this->createMock(
ILIAS\Language\Language::class);
74 return new I\Input\Field\Factory(
87 $input =
$f->text(
"label",
"byline");
88 $this->assertInstanceOf(\
ILIAS\
UI\
Component\Input\Container\Form\FormInput::class, $input);
89 $this->assertInstanceOf(Field\Text::class, $input);
96 $input =
$f->numeric(
"label",
"byline");
97 $this->assertInstanceOf(\
ILIAS\
UI\
Component\Input\Container\Form\FormInput::class, $input);
98 $this->assertInstanceOf(Field\Numeric::class, $input);
105 $input =
$f->section([],
"label",
"byline");
106 $this->assertInstanceOf(\
ILIAS\
UI\
Component\Input\Container\Form\FormInput::class, $input);
107 $this->assertInstanceOf(Field\Group::class, $input);
108 $this->assertInstanceOf(Field\Section::class, $input);
115 $input =
$f->group([]);
116 $this->assertInstanceOf(\
ILIAS\
UI\
Component\Input\Container\Form\FormInput::class, $input);
117 $this->assertInstanceOf(Field\Group::class, $input);
124 $input =
$f->checkbox(
"label",
"byline");
125 $this->assertInstanceOf(\
ILIAS\
UI\
Component\Input\Container\Form\FormInput::class, $input);
126 $this->assertInstanceOf(Field\Checkbox::class, $input);
133 $input =
$f->tag(
"label", [],
"byline");
134 $this->assertInstanceOf(\
ILIAS\
UI\
Component\Input\Container\Form\FormInput::class, $input);
135 $this->assertInstanceOf(Field\Tag::class, $input);
142 $input =
$f->password(
"label",
"byline");
143 $this->assertInstanceOf(\
ILIAS\
UI\
Component\Input\Container\Form\FormInput::class, $input);
144 $this->assertInstanceOf(Field\Password::class, $input);
151 $input =
$f->select(
"label", [],
"byline");
152 $this->assertInstanceOf(\
ILIAS\
UI\
Component\Input\Container\Form\FormInput::class, $input);
153 $this->assertInstanceOf(Field\Select::class, $input);
160 $input =
$f->textarea(
"label",
"byline");
161 $this->assertInstanceOf(\
ILIAS\
UI\
Component\Input\Container\Form\FormInput::class, $input);
162 $this->assertInstanceOf(Field\Textarea::class, $input);
169 $input =
$f->radio(
"label",
"byline");
170 $this->assertInstanceOf(\
ILIAS\
UI\
Component\Input\Container\Form\FormInput::class, $input);
171 $this->assertInstanceOf(Field\Radio::class, $input);
178 $input =
$f->multiSelect(
"label", [],
"byline");
179 $this->assertInstanceOf(\
ILIAS\
UI\
Component\Input\Container\Form\FormInput::class, $input);
180 $this->assertInstanceOf(Field\MultiSelect::class, $input);
187 $input =
$f->datetime(
"label",
"byline");
188 $this->assertInstanceOf(\
ILIAS\
UI\
Component\Input\Container\Form\FormInput::class, $input);
195 $input =
$f->duration(
"label",
"byline");
196 $this->assertInstanceOf(\
ILIAS\
UI\
Component\Input\Container\Form\FormInput::class, $input);
197 $this->assertInstanceOf(Field\Group::class, $input);
204 $input =
$f->text(
"label");
205 $this->assertInstanceOf(\
ILIAS\
UI\
Component\Input\Container\Form\FormInput::class, $input);
206 $this->assertInstanceOf(Field\Text::class, $input);
208 $input =
$f->numeric(
"label");
209 $this->assertInstanceOf(\
ILIAS\
UI\
Component\Input\Container\Form\FormInput::class, $input);
210 $this->assertInstanceOf(Field\Numeric::class, $input);
212 $input =
$f->section([],
"label");
213 $this->assertInstanceOf(\
ILIAS\
UI\
Component\Input\Container\Form\FormInput::class, $input);
214 $this->assertInstanceOf(Field\Group::class, $input);
215 $this->assertInstanceOf(Field\Section::class, $input);
217 $input =
$f->checkbox(
"label");
218 $this->assertInstanceOf(\
ILIAS\
UI\
Component\Input\Container\Form\FormInput::class, $input);
219 $this->assertInstanceOf(Field\Checkbox::class, $input);
221 $input =
$f->tag(
"label", []);
222 $this->assertInstanceOf(\
ILIAS\
UI\
Component\Input\Container\Form\FormInput::class, $input);
223 $this->assertInstanceOf(Field\Tag::class, $input);
225 $input =
$f->password(
"label");
226 $this->assertInstanceOf(\
ILIAS\
UI\
Component\Input\Container\Form\FormInput::class, $input);
227 $this->assertInstanceOf(Field\Password::class, $input);
229 $input =
$f->select(
"label", []);
230 $this->assertInstanceOf(\
ILIAS\
UI\
Component\Input\Container\Form\FormInput::class, $input);
231 $this->assertInstanceOf(Field\Select::class, $input);
233 $input =
$f->textarea(
"label");
234 $this->assertInstanceOf(\
ILIAS\
UI\
Component\Input\Container\Form\FormInput::class, $input);
235 $this->assertInstanceOf(Field\Textarea::class, $input);
237 $input =
$f->radio(
"label");
238 $this->assertInstanceOf(\
ILIAS\
UI\
Component\Input\Container\Form\FormInput::class, $input);
239 $this->assertInstanceOf(Field\Radio::class, $input);
241 $input =
$f->multiSelect(
"label", []);
242 $this->assertInstanceOf(\
ILIAS\
UI\
Component\Input\Container\Form\FormInput::class, $input);
243 $this->assertInstanceOf(Field\MultiSelect::class, $input);
testImplementsFactoryInterfaceForPassword()
static string $factory_title
Interface Observer Contains several chained tasks and infos about them.
testImplementsFactoryInterfaceForNumeric()
testImplementsFactoryInterfaceForText()
testImplementsFactoryInterfaceForSelect()
testImplementsFactoryInterfaceForMultiselect()
testImplementsFactoryInterfaceForTag()
testImplementsFactoryInterfaceForDuration()
testImplementsFactoryNoByLine()
testImplementsFactoryInterfaceForDatetime()
testImplementsFactoryInterfaceForTextarea()
testImplementsFactoryInterfaceForSection()
testImplementsFactoryInterfaceForCheckbox()
testImplementsFactoryInterfaceForRadio()
Defines tests every SHOULD pass UI-factory.
testImplementsFactoryInterfaceForGroup()
static array $kitchensink_info_settings