ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
FormFactoryTest.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
21 require_once 'tests/UI/AbstractFactoryTest.php';
22 
25 use ILIAS\Data;
28 
30 {
31  public array $kitchensink_info_settings = [
32  "standard" => [
33  "context" => false,
34  ],
35  ];
36 
37  public 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  $language = $this->createMock(ilLanguage::class);
43  return new I\Container\Form\Factory(
44  new I\Field\Factory(
45  $this->createMock(\ILIAS\UI\Implementation\Component\Input\UploadLimitResolver::class),
46  new SignalGenerator(),
47  $df,
48  new Factory($df, $language),
49  $language
50  )
51  );
52  }
53 
54  public function testImplementsFactoryInterface(): void
55  {
56  $f = $this->buildFactory();
57 
58  $form = $f->standard("#", []);
59  $this->assertInstanceOf(Form\Form::class, $form);
60  $this->assertInstanceOf(Form\Standard::class, $form);
61  }
62 }
array string $factory_title
This describes commonalities between all forms.
Definition: Form.php:32
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...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: Factory.php:21
array $kitchensink_info_settings
Defines tests every SHOULD pass UI-factory.
This describes commonalities between all inputs.
Definition: Input.php:46
This describes commonalities between all Containers for Inputs, such as Forms.
Definition: Container.php:31
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...