ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
FormFactoryTest.php
Go to the documentation of this file.
1<?php
2
3require_once 'tests/UI/AbstractFactoryTest.php';
4
5use \ILIAS\UI\Component\Input\Container\Form;
7use \ILIAS\Data;
9
11{
13 "standard" => array(
14 "context" => false,
15 ),
16 );
17 public $factory_title = 'ILIAS\\UI\\Component\\Input\\Container\\Form\\Factory';
18
19
20 final public function buildFactory()
21 {
22 $df = new Data\Factory();
23 $language = $this->createMock(\ilLanguage::class);
24 return new \ILIAS\UI\Implementation\Component\Input\Container\Form\Factory(
25 new \ILIAS\UI\Implementation\Component\Input\Field\Factory(
26 new SignalGenerator(),
27 $df,
28 new \ILIAS\Refinery\Factory($df, $language),
29 $language
30 )
31 );
32 }
33
34
36 {
37 $f = $this->buildFactory();
38
39 $form = $f->standard("#", []);
40 $this->assertInstanceOf(Form\Form::class, $form);
41 $this->assertInstanceOf(Form\Standard::class, $form);
42 }
43}
Defines tests every SHOULD pass UI-factory.
An exception for terminatinating execution or to throw for unit testing.
Builds data types.
Definition: Factory.php:20
A component is the most general form of an entity in the UI.
Definition: Component.php:14
This describes commonalities between all forms.
Definition: Form.php:16
Class ChatMainBarProvider \MainMenu\Provider.
Class Factory.