ILIAS  trunk Revision v11.0_alpha-1689-g66c127b4ae8
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
FormFactoryTest.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
21 require_once 'components/ILIAS/UI/tests/AbstractFactoryTestCase.php';
22 
25 use 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\UploadLimitResolver::class),
47  $signal_generator,
48  $df,
49  new Factory($df, $language),
50  $language
51  ),
52  $signal_generator
53  );
54  }
55 
56  public function testImplementsFactoryInterface(): void
57  {
58  $f = $this->buildFactory();
59 
60  $form = $f->standard("#", []);
61  $this->assertInstanceOf(Form\Form::class, $form);
62  $this->assertInstanceOf(Form\Standard::class, $form);
63  }
64 }
This describes commonalities between all forms.
Definition: Form.php:32
Interface Observer Contains several chained tasks and infos about them.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: Factory.php:21
static array $kitchensink_info_settings
static array static string $factory_title
Builds data types.
Definition: Factory.php:35
This describes commonalities between all inputs.
Definition: Input.php:46
This describes commonalities between all Containers for Inputs, such as Forms.
Definition: Container.php:32
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Defines tests every SHOULD pass UI-factory.