ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
FormFactoryTest.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
21require_once 'components/ILIAS/UI/tests/AbstractFactoryTestCase.php';
22
25use ILIAS\Data;
28
30{
31 public static array $kitchensink_info_settings = [
32 "standard" => [
33 "context" => false,
34 ],
35 ];
36
37 public static string $factory_title = 'ILIAS\\UI\\Component\\Input\\Container\\Form\\Factory';
38
39 final public function buildFactory(): I\Container\Form\Factory
40 {
41 $df = new Data\Factory();
42 $signal_generator = new SignalGenerator();
43 $language = $this->createMock(ILIAS\Language\Language::class);
44 return new I\Container\Form\Factory(
45 new I\Field\Factory(
46 $this->createMock(\ILIAS\UI\Implementation\Component\Input\Field\Node\Factory::class),
47 $this->createMock(\ILIAS\UI\Implementation\Component\Input\UploadLimitResolver::class),
48 $signal_generator,
49 $df,
50 new Factory($df, $language),
51 $language
52 ),
53 $signal_generator
54 );
55 }
56
57 public function testImplementsFactoryInterface(): void
58 {
59 $f = $this->buildFactory();
60
61 $form = $f->standard("#", []);
62 $this->assertInstanceOf(Form\Form::class, $form);
63 $this->assertInstanceOf(Form\Standard::class, $form);
64 }
65}
Defines tests every SHOULD pass UI-factory.
static array $kitchensink_info_settings
static string $factory_title
Builds data types.
Definition: Factory.php:36
Definition: UI.php:24
This describes commonalities between all Containers for Inputs, such as Forms.
Definition: Container.php:33
This describes commonalities between all forms.
Definition: Form.php:33
This describes commonalities between all inputs.
Definition: Input.php:47
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: Factory.php:21
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Interface Observer \BackgroundTasks Contains several chained tasks and infos about them.