2 namespace TYPO3\CMS\Backend\Tests\Unit\Form\FormDataProvider;
17 use TYPO3\CMS\Core\Tests\UnitTestCase;
42 'recordTypeValue' =>
'aType',
47 'subtype_value_field' =>
'bar',
48 'subtypes_excludelist' => [],
49 'subtypes_addlist' => [],
50 'bitmask_value_field' =>
'foobar',
51 'bitmask_excludelist_bits' => [],
57 $expected[
'processedTca'][
'types'][
'aType'] = [
60 $this->assertSame($expected, $this->subject->addData($input));
69 'recordTypeValue' =>
'aType',
71 'theSubtypeValueField' =>
'theSubtypeValue',
76 'showitem' =>
'aField,theSubtypeValueField,anotherField',
77 'subtype_value_field' =>
'theSubtypeValueField',
78 'subtypes_addlist' => [
79 'theSubtypeValue' =>
'additionalField',
86 'recordTypeValue' =>
'aType',
88 'theSubtypeValueField' =>
'theSubtypeValue',
93 'showitem' =>
'aField,theSubtypeValueField,additionalField,anotherField',
98 $this->assertSame($expected, $this->subject->addData($input));
107 'recordTypeValue' =>
'aType',
109 'theSubtypeValueField' =>
'theSubtypeValue',
114 'showitem' =>
'aField,--palette--;;aPalette,anotherField',
115 'subtype_value_field' =>
'theSubtypeValueField',
116 'subtypes_addlist' => [
117 'theSubtypeValue' =>
'additionalField',
123 'showitem' =>
'foo,theSubtypeValueField,bar',
129 'recordTypeValue' =>
'aType',
131 'theSubtypeValueField' =>
'theSubtypeValue',
136 'showitem' =>
'aField,--palette--;;aPalette,additionalField,anotherField',
141 'showitem' =>
'foo,theSubtypeValueField,bar',
146 $this->assertSame($expected, $this->subject->addData($input));
155 'recordTypeValue' =>
'aType',
157 'theSubtypeValueField' =>
'subtypeMatch',
162 'showitem' =>
'aField, removeMe, anotherField',
163 'subtype_value_field' =>
'theSubtypeValueField',
164 'subtypes_excludelist' => [
165 'subtypeMatch' =>
'removeMe',
172 'recordTypeValue' =>
'aType',
174 'theSubtypeValueField' =>
'subtypeMatch',
179 'showitem' =>
'aField,anotherField',
184 $this->assertSame($expected, $this->subject->addData($input));
193 'recordTypeValue' =>
'aType',
195 'theSubtypeValueField' =>
'subtypeMatch',
201 'subtype_value_field' =>
'theSubtypeValueField',
202 'subtypes_excludelist' => [
203 'subtypeMatch' =>
'removeMe',
209 'showitem' =>
'aField, removeMe, anotherField',
215 'recordTypeValue' =>
'aType',
217 'theSubtypeValueField' =>
'subtypeMatch',
227 'showitem' =>
'aField,anotherField',
232 $this->assertSame($expected, $this->subject->addData($input));
241 'recordTypeValue' =>
'aType',
243 'theSubtypeValueField' => 10,
248 'showitem' =>
'aField, removedBy3, anotherField, removedBy2',
249 'bitmask_value_field' =>
'theSubtypeValueField',
250 'bitmask_excludelist_bits' => [
251 '-2' =>
'removedBy2',
252 '+3' =>
'removedBy3',
259 'recordTypeValue' =>
'aType',
261 'theSubtypeValueField' => 10,
266 'showitem' =>
'aField,anotherField',
271 $this->assertSame($expected, $this->subject->addData($input));
280 'recordTypeValue' =>
'aType',
282 'theSubtypeValueField' => 10,
288 'bitmask_value_field' =>
'theSubtypeValueField',
289 'bitmask_excludelist_bits' => [
297 'showitem' =>
'aField, removeMe, anotherField',
299 'anotherPalette' => [
300 'showitem' =>
'removeMe2',
306 'recordTypeValue' =>
'aType',
308 'theSubtypeValueField' => 10,
318 'showitem' =>
'aField,anotherField',
320 'anotherPalette' => [
326 $this->assertSame($expected, $this->subject->addData($input));