ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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;
8use \ILIAS\Validation;
9use \ILIAS\Transformation;
10
12{
14 "standard" => array(
15 "context" => false,
16 ),
17 );
18 public $factory_title = 'ILIAS\\UI\\Component\\Input\\Container\\Form\\Factory';
19
20
21 final public function buildFactory()
22 {
23 $df = new Data\Factory();
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 Validation\Factory($df, $this->createMock(\ilLanguage::class)),
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:15
A transformation is a function from one datatype to another.
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 BaseForm.
Class Factory.
if(isset($_POST['submit'])) $form