ILIAS  release_8 Revision v8.24
FieldFactoryTest Class Reference
+ Inheritance diagram for FieldFactoryTest:
+ Collaboration diagram for FieldFactoryTest:

Public Member Functions

 buildFactory ()
 
 testImplementsFactoryInterfaceForText ()
 
 testImplementsFactoryInterfaceForNumeric ()
 
 testImplementsFactoryInterfaceForSection ()
 
 testImplementsFactoryInterfaceForGroup ()
 
 testImplementsFactoryInterfaceForCheckbox ()
 
 testImplementsFactoryInterfaceForTag ()
 
 testImplementsFactoryInterfaceForPassword ()
 
 testImplementsFactoryInterfaceForSelect ()
 
 testImplementsFactoryInterfaceForTextarea ()
 
 testImplementsFactoryInterfaceForRadio ()
 
 testImplementsFactoryInterfaceForMultiselect ()
 
 testImplementsFactoryInterfaceForDatetime ()
 
 testImplementsFactoryInterfaceForDuration ()
 
 test_implements_factory_no_by_line ()
 
- Public Member Functions inherited from AbstractFactoryTest
 buildFactoryReflection ()
 
 methods_provider ()
 
 setUp ()
 
 test_proper_namespace ()
 
 test_proper_name ()
 
 test_check_yaml_extraction (ReflectionMethod $method_reflection, string $name)
 Tests whether the YAML Kitchen Sink info can be parsed. More...
 
 test_return_type (ReflectionMethod $method_reflection, string $name)
 Tests whether the method either returns a factory or a component. More...
 
 test_factory_method_name_compatible_docstring (ReflectionMethod $method_reflection, string $name)
 Tests whether the method name matches the return doctring? More...
 
 test_method_params (ReflectionMethod $method_reflection, string $name)
 Tests whether methods returning factories have no parameters. More...
 
 test_kitchensink_info_description (ReflectionMethod $method_reflection, string $name)
 @dataProvider methods_provider More...
 
 test_kitchensink_info_rivals (ReflectionMethod $method_reflection, string $name)
 @dataProvider methods_provider More...
 
 test_kitchensink_info_background (ReflectionMethod $method_reflection, string $name)
 @dataProvider methods_provider More...
 
 test_kitchensink_info_featurewiki (ReflectionMethod $method_reflection, string $name)
 @dataProvider methods_provider More...
 
 test_kitchensink_info_javascript (ReflectionMethod $method_reflection, string $name)
 @dataProvider methods_provider More...
 
 test_kitchensink_info_rules (ReflectionMethod $method_reflection, string $name)
 @dataProvider methods_provider More...
 
 test_kitchensink_info_context (ReflectionMethod $method_reflection, string $name)
 @dataProvider methods_provider More...
 
 kitchensink_info_settings_merged_with_defaults (string $name)
 

Data Fields

array $kitchensink_info_settings
 
string $factory_title = 'ILIAS\\UI\\Component\\Input\\Field\\Factory'
 
- Data Fields inherited from AbstractFactoryTest
const COMPONENT = 1
 
const FACTORY = 2
 

Additional Inherited Members

- Protected Member Functions inherited from AbstractFactoryTest
 returnsFactory (array $docstring_data)
 
 returnsComponent (array $docstring_data)
 
 isFactoryName (string $name)
 
 get_regex_factory_namespace ()
 

Detailed Description

Definition at line 29 of file FieldFactoryTest.php.

Member Function Documentation

◆ buildFactory()

FieldFactoryTest::buildFactory ( )
final

Definition at line 70 of file FieldFactoryTest.php.

70 : I\Input\Field\Factory
71 {
72 $df = new Data\Factory();
73 $language = $this->createMock(ilLanguage::class);
74 return new I\Input\Field\Factory(
75 $this->createMock(\ILIAS\UI\Implementation\Component\Input\UploadLimitResolver::class),
76 new SignalGenerator(),
77 $df,
78 new Refinery($df, $language),
79 $language
80 );
81 }
This is a legacy support of Component\Input\Field\Input that has been moved to Component\Input\Contai...
Definition: Input.php:32
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Class ChatMainBarProvider \MainMenu\Provider.
Class Factory.

Referenced by test_implements_factory_no_by_line(), testImplementsFactoryInterfaceForCheckbox(), testImplementsFactoryInterfaceForDatetime(), testImplementsFactoryInterfaceForDuration(), testImplementsFactoryInterfaceForGroup(), testImplementsFactoryInterfaceForMultiselect(), testImplementsFactoryInterfaceForNumeric(), testImplementsFactoryInterfaceForPassword(), testImplementsFactoryInterfaceForRadio(), testImplementsFactoryInterfaceForSection(), testImplementsFactoryInterfaceForSelect(), testImplementsFactoryInterfaceForTag(), testImplementsFactoryInterfaceForText(), and testImplementsFactoryInterfaceForTextarea().

+ Here is the caller graph for this function:

◆ test_implements_factory_no_by_line()

FieldFactoryTest::test_implements_factory_no_by_line ( )

Definition at line 200 of file FieldFactoryTest.php.

200 : void
201 {
202 $f = $this->buildFactory();
203
204 $input = $f->text("label");
205 $this->assertInstanceOf(\ILIAS\UI\Component\Input\Container\Form\FormInput::class, $input);
206 $this->assertInstanceOf(Field\Text::class, $input);
207
208 $input = $f->numeric("label");
209 $this->assertInstanceOf(\ILIAS\UI\Component\Input\Container\Form\FormInput::class, $input);
210 $this->assertInstanceOf(Field\Numeric::class, $input);
211
212 $input = $f->section([], "label");
213 $this->assertInstanceOf(\ILIAS\UI\Component\Input\Container\Form\FormInput::class, $input);
214 $this->assertInstanceOf(Field\Group::class, $input);
215 $this->assertInstanceOf(Field\Section::class, $input);
216
217 $input = $f->checkbox("label");
218 $this->assertInstanceOf(\ILIAS\UI\Component\Input\Container\Form\FormInput::class, $input);
219 $this->assertInstanceOf(Field\Checkbox::class, $input);
220
221 $input = $f->tag("label", []);
222 $this->assertInstanceOf(\ILIAS\UI\Component\Input\Container\Form\FormInput::class, $input);
223 $this->assertInstanceOf(Field\Tag::class, $input);
224
225 $input = $f->password("label");
226 $this->assertInstanceOf(\ILIAS\UI\Component\Input\Container\Form\FormInput::class, $input);
227 $this->assertInstanceOf(Field\Password::class, $input);
228
229 $input = $f->select("label", []);
230 $this->assertInstanceOf(\ILIAS\UI\Component\Input\Container\Form\FormInput::class, $input);
231 $this->assertInstanceOf(Field\Select::class, $input);
232
233 $input = $f->textarea("label");
234 $this->assertInstanceOf(\ILIAS\UI\Component\Input\Container\Form\FormInput::class, $input);
235 $this->assertInstanceOf(Field\Textarea::class, $input);
236
237 $input = $f->radio("label");
238 $this->assertInstanceOf(\ILIAS\UI\Component\Input\Container\Form\FormInput::class, $input);
239 $this->assertInstanceOf(Field\Radio::class, $input);
240
241 $input = $f->multiSelect("label", []);
242 $this->assertInstanceOf(\ILIAS\UI\Component\Input\Container\Form\FormInput::class, $input);
243 $this->assertInstanceOf(Field\MultiSelect::class, $input);
244 }

References Vendor\Package\$f, and buildFactory().

+ Here is the call graph for this function:

◆ testImplementsFactoryInterfaceForCheckbox()

FieldFactoryTest::testImplementsFactoryInterfaceForCheckbox ( )

Definition at line 120 of file FieldFactoryTest.php.

120 : void
121 {
122 $f = $this->buildFactory();
123
124 $input = $f->checkbox("label", "byline");
125 $this->assertInstanceOf(\ILIAS\UI\Component\Input\Container\Form\FormInput::class, $input);
126 $this->assertInstanceOf(Field\Checkbox::class, $input);
127 }

References Vendor\Package\$f, and buildFactory().

+ Here is the call graph for this function:

◆ testImplementsFactoryInterfaceForDatetime()

FieldFactoryTest::testImplementsFactoryInterfaceForDatetime ( )

Definition at line 183 of file FieldFactoryTest.php.

183 : void
184 {
185 $f = $this->buildFactory();
186
187 $input = $f->datetime("label", "byline");
188 $this->assertInstanceOf(\ILIAS\UI\Component\Input\Container\Form\FormInput::class, $input);
189 }

References Vendor\Package\$f, and buildFactory().

+ Here is the call graph for this function:

◆ testImplementsFactoryInterfaceForDuration()

FieldFactoryTest::testImplementsFactoryInterfaceForDuration ( )

Definition at line 191 of file FieldFactoryTest.php.

191 : void
192 {
193 $f = $this->buildFactory();
194
195 $input = $f->duration("label", "byline");
196 $this->assertInstanceOf(\ILIAS\UI\Component\Input\Container\Form\FormInput::class, $input);
197 $this->assertInstanceOf(Field\Group::class, $input);
198 }

References Vendor\Package\$f, and buildFactory().

+ Here is the call graph for this function:

◆ testImplementsFactoryInterfaceForGroup()

FieldFactoryTest::testImplementsFactoryInterfaceForGroup ( )

Definition at line 111 of file FieldFactoryTest.php.

111 : void
112 {
113 $f = $this->buildFactory();
114
115 $input = $f->group([]);
116 $this->assertInstanceOf(\ILIAS\UI\Component\Input\Container\Form\FormInput::class, $input);
117 $this->assertInstanceOf(Field\Group::class, $input);
118 }

References Vendor\Package\$f, and buildFactory().

+ Here is the call graph for this function:

◆ testImplementsFactoryInterfaceForMultiselect()

FieldFactoryTest::testImplementsFactoryInterfaceForMultiselect ( )

Definition at line 174 of file FieldFactoryTest.php.

174 : void
175 {
176 $f = $this->buildFactory();
177
178 $input = $f->multiSelect("label", [], "byline");
179 $this->assertInstanceOf(\ILIAS\UI\Component\Input\Container\Form\FormInput::class, $input);
180 $this->assertInstanceOf(Field\MultiSelect::class, $input);
181 }

References Vendor\Package\$f, and buildFactory().

+ Here is the call graph for this function:

◆ testImplementsFactoryInterfaceForNumeric()

FieldFactoryTest::testImplementsFactoryInterfaceForNumeric ( )

Definition at line 92 of file FieldFactoryTest.php.

92 : void
93 {
94 $f = $this->buildFactory();
95
96 $input = $f->numeric("label", "byline");
97 $this->assertInstanceOf(\ILIAS\UI\Component\Input\Container\Form\FormInput::class, $input);
98 $this->assertInstanceOf(Field\Numeric::class, $input);
99 }

References Vendor\Package\$f, and buildFactory().

+ Here is the call graph for this function:

◆ testImplementsFactoryInterfaceForPassword()

FieldFactoryTest::testImplementsFactoryInterfaceForPassword ( )

Definition at line 138 of file FieldFactoryTest.php.

138 : void
139 {
140 $f = $this->buildFactory();
141
142 $input = $f->password("label", "byline");
143 $this->assertInstanceOf(\ILIAS\UI\Component\Input\Container\Form\FormInput::class, $input);
144 $this->assertInstanceOf(Field\Password::class, $input);
145 }

References Vendor\Package\$f, and buildFactory().

+ Here is the call graph for this function:

◆ testImplementsFactoryInterfaceForRadio()

FieldFactoryTest::testImplementsFactoryInterfaceForRadio ( )

Definition at line 165 of file FieldFactoryTest.php.

165 : void
166 {
167 $f = $this->buildFactory();
168
169 $input = $f->radio("label", "byline");
170 $this->assertInstanceOf(\ILIAS\UI\Component\Input\Container\Form\FormInput::class, $input);
171 $this->assertInstanceOf(Field\Radio::class, $input);
172 }

References Vendor\Package\$f, and buildFactory().

+ Here is the call graph for this function:

◆ testImplementsFactoryInterfaceForSection()

FieldFactoryTest::testImplementsFactoryInterfaceForSection ( )

Definition at line 101 of file FieldFactoryTest.php.

101 : void
102 {
103 $f = $this->buildFactory();
104
105 $input = $f->section([], "label", "byline");
106 $this->assertInstanceOf(\ILIAS\UI\Component\Input\Container\Form\FormInput::class, $input);
107 $this->assertInstanceOf(Field\Group::class, $input);
108 $this->assertInstanceOf(Field\Section::class, $input);
109 }

References Vendor\Package\$f, and buildFactory().

+ Here is the call graph for this function:

◆ testImplementsFactoryInterfaceForSelect()

FieldFactoryTest::testImplementsFactoryInterfaceForSelect ( )

Definition at line 147 of file FieldFactoryTest.php.

147 : void
148 {
149 $f = $this->buildFactory();
150
151 $input = $f->select("label", [], "byline");
152 $this->assertInstanceOf(\ILIAS\UI\Component\Input\Container\Form\FormInput::class, $input);
153 $this->assertInstanceOf(Field\Select::class, $input);
154 }

References Vendor\Package\$f, and buildFactory().

+ Here is the call graph for this function:

◆ testImplementsFactoryInterfaceForTag()

FieldFactoryTest::testImplementsFactoryInterfaceForTag ( )

Definition at line 129 of file FieldFactoryTest.php.

129 : void
130 {
131 $f = $this->buildFactory();
132
133 $input = $f->tag("label", [], "byline");
134 $this->assertInstanceOf(\ILIAS\UI\Component\Input\Container\Form\FormInput::class, $input);
135 $this->assertInstanceOf(Field\Tag::class, $input);
136 }

References Vendor\Package\$f, and buildFactory().

+ Here is the call graph for this function:

◆ testImplementsFactoryInterfaceForText()

FieldFactoryTest::testImplementsFactoryInterfaceForText ( )

Definition at line 83 of file FieldFactoryTest.php.

83 : void
84 {
85 $f = $this->buildFactory();
86
87 $input = $f->text("label", "byline");
88 $this->assertInstanceOf(\ILIAS\UI\Component\Input\Container\Form\FormInput::class, $input);
89 $this->assertInstanceOf(Field\Text::class, $input);
90 }

References Vendor\Package\$f, and buildFactory().

+ Here is the call graph for this function:

◆ testImplementsFactoryInterfaceForTextarea()

FieldFactoryTest::testImplementsFactoryInterfaceForTextarea ( )

Definition at line 156 of file FieldFactoryTest.php.

156 : void
157 {
158 $f = $this->buildFactory();
159
160 $input = $f->textarea("label", "byline");
161 $this->assertInstanceOf(\ILIAS\UI\Component\Input\Container\Form\FormInput::class, $input);
162 $this->assertInstanceOf(Field\Textarea::class, $input);
163 }

References Vendor\Package\$f, and buildFactory().

+ Here is the call graph for this function:

Field Documentation

◆ $factory_title

string FieldFactoryTest::$factory_title = 'ILIAS\\UI\\Component\\Input\\Field\\Factory'

Definition at line 67 of file FieldFactoryTest.php.

◆ $kitchensink_info_settings

array FieldFactoryTest::$kitchensink_info_settings

Definition at line 31 of file FieldFactoryTest.php.


The documentation for this class was generated from the following file: