ILIAS  trunk Revision v11.0_alpha-2638-g80c1d007f79
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 ()
 
 testImplementsFactoryNoByLine ()
 
- Public Member Functions inherited from AbstractFactoryTestCase
 setUp ()
 
 testProperNamespace ()
 
 testProperName ()
 
 testCheckYamlExtraction (ReflectionMethod $method_reflection, string $name)
 Tests whether the YAML Kitchen Sink info can be parsed. More...
 
 testReturnType (ReflectionMethod $method_reflection, string $name)
 Tests whether the method either returns a factory or a component. More...
 
 testFactoryMethodNameCompatibleDocstring (ReflectionMethod $method_reflection, string $name)
 Tests whether the method name matches the return doctring? More...
 
 testMethodParams (ReflectionMethod $method_reflection, string $name)
 Tests whether methods returning factories have no parameters. More...
 
 testKitchensinkInfoDescription (ReflectionMethod $method_reflection, string $name)
 
 testKitchensinkInfoRivals (ReflectionMethod $method_reflection, string $name)
 
 testKitchensinkInfoBackground (ReflectionMethod $method_reflection, string $name)
 
 testKitchensinkInfoFeatureWiki (ReflectionMethod $method_reflection, string $name)
 
 testKitchensinkInfoJavaScript (ReflectionMethod $method_reflection, string $name)
 
 testKitchensinkInfoRules (ReflectionMethod $method_reflection, string $name)
 
 testKitchensinkInfoContext (ReflectionMethod $method_reflection, string $name)
 
 kitchensinkInfoSettingsMergedWithDefaults (string $name)
 

Static Public Attributes

static array $kitchensink_info_settings
 
static array numeric
 
static string $factory_title = 'ILIAS\\UI\\Component\\Input\\Field\\Factory'
 
- Static Public Attributes inherited from AbstractFactoryTestCase
static string $factory_title = ''
 

Additional Inherited Members

- Static Public Member Functions inherited from AbstractFactoryTestCase
static buildFactoryReflection ()
 
static getMethodsProvider ()
 
- Data Fields inherited from AbstractFactoryTestCase
const COMPONENT = 1
 
const FACTORY = 2
 
- Protected Member Functions inherited from AbstractFactoryTestCase
 returnsFactory (array $docstring_data)
 
 returnsComponent (array $docstring_data)
 
 isFactoryName (string $name)
 
 getRegexFactoryNamespace ()
 

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.

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

70  : I\Input\Field\Factory
71  {
72  $df = new Data\Factory();
73  $language = $this->createMock(ILIAS\Language\Language::class);
74  return new I\Input\Field\Factory(
75  $this->createMock(\ILIAS\UI\Implementation\Component\Input\Field\Node\Factory::class),
76  $this->createMock(\ILIAS\UI\Implementation\Component\Input\UploadLimitResolver::class),
77  new SignalGenerator(),
78  $df,
79  new Refinery($df, $language),
80  $language
81  );
82  }
Interface Observer Contains several chained tasks and infos about them.
+ Here is the caller graph for this function:

◆ testImplementsFactoryInterfaceForCheckbox()

FieldFactoryTest::testImplementsFactoryInterfaceForCheckbox ( )

Definition at line 121 of file FieldFactoryTest.php.

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

121  : void
122  {
123  $f = $this->buildFactory();
124 
125  $input = $f->checkbox("label", "byline");
126  $this->assertInstanceOf(\ILIAS\UI\Component\Input\Container\Form\FormInput::class, $input);
127  $this->assertInstanceOf(Field\Checkbox::class, $input);
128  }
Interface Observer Contains several chained tasks and infos about them.
+ Here is the call graph for this function:

◆ testImplementsFactoryInterfaceForDatetime()

FieldFactoryTest::testImplementsFactoryInterfaceForDatetime ( )

Definition at line 184 of file FieldFactoryTest.php.

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

184  : void
185  {
186  $f = $this->buildFactory();
187 
188  $input = $f->datetime("label", "byline");
189  $this->assertInstanceOf(\ILIAS\UI\Component\Input\Container\Form\FormInput::class, $input);
190  }
Interface Observer Contains several chained tasks and infos about them.
+ Here is the call graph for this function:

◆ testImplementsFactoryInterfaceForDuration()

FieldFactoryTest::testImplementsFactoryInterfaceForDuration ( )

Definition at line 192 of file FieldFactoryTest.php.

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

192  : void
193  {
194  $f = $this->buildFactory();
195 
196  $input = $f->duration("label", "byline");
197  $this->assertInstanceOf(\ILIAS\UI\Component\Input\Container\Form\FormInput::class, $input);
198  $this->assertInstanceOf(Field\Group::class, $input);
199  }
Interface Observer Contains several chained tasks and infos about them.
+ Here is the call graph for this function:

◆ testImplementsFactoryInterfaceForGroup()

FieldFactoryTest::testImplementsFactoryInterfaceForGroup ( )

Definition at line 112 of file FieldFactoryTest.php.

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

112  : void
113  {
114  $f = $this->buildFactory();
115 
116  $input = $f->group([]);
117  $this->assertInstanceOf(\ILIAS\UI\Component\Input\Container\Form\FormInput::class, $input);
118  $this->assertInstanceOf(Field\Group::class, $input);
119  }
Interface Observer Contains several chained tasks and infos about them.
+ Here is the call graph for this function:

◆ testImplementsFactoryInterfaceForMultiselect()

FieldFactoryTest::testImplementsFactoryInterfaceForMultiselect ( )

Definition at line 175 of file FieldFactoryTest.php.

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

175  : void
176  {
177  $f = $this->buildFactory();
178 
179  $input = $f->multiSelect("label", [], "byline");
180  $this->assertInstanceOf(\ILIAS\UI\Component\Input\Container\Form\FormInput::class, $input);
181  $this->assertInstanceOf(Field\MultiSelect::class, $input);
182  }
Interface Observer Contains several chained tasks and infos about them.
+ Here is the call graph for this function:

◆ testImplementsFactoryInterfaceForNumeric()

FieldFactoryTest::testImplementsFactoryInterfaceForNumeric ( )

Definition at line 93 of file FieldFactoryTest.php.

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

93  : void
94  {
95  $f = $this->buildFactory();
96 
97  $input = $f->numeric("label", "byline");
98  $this->assertInstanceOf(\ILIAS\UI\Component\Input\Container\Form\FormInput::class, $input);
99  $this->assertInstanceOf(Field\Numeric::class, $input);
100  }
Interface Observer Contains several chained tasks and infos about them.
+ Here is the call graph for this function:

◆ testImplementsFactoryInterfaceForPassword()

FieldFactoryTest::testImplementsFactoryInterfaceForPassword ( )

Definition at line 139 of file FieldFactoryTest.php.

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

139  : void
140  {
141  $f = $this->buildFactory();
142 
143  $input = $f->password("label", "byline");
144  $this->assertInstanceOf(\ILIAS\UI\Component\Input\Container\Form\FormInput::class, $input);
145  $this->assertInstanceOf(Field\Password::class, $input);
146  }
Interface Observer Contains several chained tasks and infos about them.
+ Here is the call graph for this function:

◆ testImplementsFactoryInterfaceForRadio()

FieldFactoryTest::testImplementsFactoryInterfaceForRadio ( )

Definition at line 166 of file FieldFactoryTest.php.

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

166  : void
167  {
168  $f = $this->buildFactory();
169 
170  $input = $f->radio("label", "byline");
171  $this->assertInstanceOf(\ILIAS\UI\Component\Input\Container\Form\FormInput::class, $input);
172  $this->assertInstanceOf(Field\Radio::class, $input);
173  }
Interface Observer Contains several chained tasks and infos about them.
+ Here is the call graph for this function:

◆ testImplementsFactoryInterfaceForSection()

FieldFactoryTest::testImplementsFactoryInterfaceForSection ( )

Definition at line 102 of file FieldFactoryTest.php.

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

102  : void
103  {
104  $f = $this->buildFactory();
105 
106  $input = $f->section([], "label", "byline");
107  $this->assertInstanceOf(\ILIAS\UI\Component\Input\Container\Form\FormInput::class, $input);
108  $this->assertInstanceOf(Field\Group::class, $input);
109  $this->assertInstanceOf(Field\Section::class, $input);
110  }
Interface Observer Contains several chained tasks and infos about them.
+ Here is the call graph for this function:

◆ testImplementsFactoryInterfaceForSelect()

FieldFactoryTest::testImplementsFactoryInterfaceForSelect ( )

Definition at line 148 of file FieldFactoryTest.php.

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

148  : void
149  {
150  $f = $this->buildFactory();
151 
152  $input = $f->select("label", [], "byline");
153  $this->assertInstanceOf(\ILIAS\UI\Component\Input\Container\Form\FormInput::class, $input);
154  $this->assertInstanceOf(Field\Select::class, $input);
155  }
Interface Observer Contains several chained tasks and infos about them.
+ Here is the call graph for this function:

◆ testImplementsFactoryInterfaceForTag()

FieldFactoryTest::testImplementsFactoryInterfaceForTag ( )

Definition at line 130 of file FieldFactoryTest.php.

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

130  : void
131  {
132  $f = $this->buildFactory();
133 
134  $input = $f->tag("label", [], "byline");
135  $this->assertInstanceOf(\ILIAS\UI\Component\Input\Container\Form\FormInput::class, $input);
136  $this->assertInstanceOf(Field\Tag::class, $input);
137  }
Interface Observer Contains several chained tasks and infos about them.
+ Here is the call graph for this function:

◆ testImplementsFactoryInterfaceForText()

FieldFactoryTest::testImplementsFactoryInterfaceForText ( )

Definition at line 84 of file FieldFactoryTest.php.

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

84  : void
85  {
86  $f = $this->buildFactory();
87 
88  $input = $f->text("label", "byline");
89  $this->assertInstanceOf(\ILIAS\UI\Component\Input\Container\Form\FormInput::class, $input);
90  $this->assertInstanceOf(Field\Text::class, $input);
91  }
Interface Observer Contains several chained tasks and infos about them.
+ Here is the call graph for this function:

◆ testImplementsFactoryInterfaceForTextarea()

FieldFactoryTest::testImplementsFactoryInterfaceForTextarea ( )

Definition at line 157 of file FieldFactoryTest.php.

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

157  : void
158  {
159  $f = $this->buildFactory();
160 
161  $input = $f->textarea("label", "byline");
162  $this->assertInstanceOf(\ILIAS\UI\Component\Input\Container\Form\FormInput::class, $input);
163  $this->assertInstanceOf(Field\Textarea::class, $input);
164  }
Interface Observer Contains several chained tasks and infos about them.
+ Here is the call graph for this function:

◆ testImplementsFactoryNoByLine()

FieldFactoryTest::testImplementsFactoryNoByLine ( )

Definition at line 201 of file FieldFactoryTest.php.

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

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

Field Documentation

◆ $factory_title

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

Definition at line 67 of file FieldFactoryTest.php.

◆ $kitchensink_info_settings

array FieldFactoryTest::$kitchensink_info_settings
static
Initial value:
= [
"text" => [
"context" => false

Definition at line 31 of file FieldFactoryTest.php.

◆ numeric

array FieldFactoryTest::numeric
static

Definition at line 35 of file FieldFactoryTest.php.


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