[BUGFIX] FormEngine: Select correct FlexForm DS for inline records
[Packages/TYPO3.CMS.git] / typo3 / sysext / backend / Tests / Unit / Form / FormDataProvider / TcaFlexProcessTest.php
index e15666f..08c60eb 100644 (file)
@@ -111,6 +111,11 @@ class TcaFlexProcessTest extends UnitTestCase
         $expected = $input;
         $expected['processedTca']['columns']['aField']['config']['ds'] = [
             'sheets' => [],
+            'meta' => [
+                'dataStructurePointers' => [
+                    'pointerField' => 'aFlex',
+                ],
+            ],
         ];
 
         $this->assertEquals($expected, $this->subject->addData($input));
@@ -189,6 +194,11 @@ class TcaFlexProcessTest extends UnitTestCase
                     ],
                 ],
             ],
+            'meta' => [
+                'dataStructurePointers' => [
+                    'pointerField' => 'aFlex',
+                ],
+            ],
         ];
 
         $this->assertEquals($expected, $this->subject->addData($input));
@@ -267,6 +277,11 @@ class TcaFlexProcessTest extends UnitTestCase
                     ],
                 ],
             ],
+            'meta' => [
+                'dataStructurePointers' => [
+                    'pointerField' => 'aFlex',
+                ],
+            ],
         ];
 
         $this->assertEquals($expected, $this->subject->addData($input));
@@ -345,6 +360,11 @@ class TcaFlexProcessTest extends UnitTestCase
                     ],
                 ],
             ],
+            'meta' => [
+                'dataStructurePointers' => [
+                    'pointerField' => 'aFlex',
+                ],
+            ],
         ];
 
         $this->assertEquals($expected, $this->subject->addData($input));
@@ -423,6 +443,11 @@ class TcaFlexProcessTest extends UnitTestCase
                     ],
                 ],
             ],
+            'meta' => [
+                'dataStructurePointers' => [
+                    'pointerField' => 'aFlex',
+                ],
+            ],
         ];
 
         $this->assertEquals($expected, $this->subject->addData($input));
@@ -485,6 +510,11 @@ class TcaFlexProcessTest extends UnitTestCase
                     ],
                 ],
             ],
+            'meta' => [
+                'dataStructurePointers' => [
+                    'pointerField' => 'aFlex',
+                ],
+            ],
         ];
 
         $this->assertEquals($expected, $this->subject->addData($input));
@@ -555,6 +585,11 @@ class TcaFlexProcessTest extends UnitTestCase
                     ],
                 ],
             ],
+            'meta' => [
+                'dataStructurePointers' => [
+                    'pointerField' => 'aFlex',
+                ],
+            ],
         ];
 
         $this->assertEquals($expected, $this->subject->addData($input));
@@ -625,6 +660,11 @@ class TcaFlexProcessTest extends UnitTestCase
                     ],
                 ],
             ],
+            'meta' => [
+                'dataStructurePointers' => [
+                    'pointerField' => 'aFlex',
+                ],
+            ],
         ];
 
         $this->assertEquals($expected, $this->subject->addData($input));
@@ -697,6 +737,11 @@ class TcaFlexProcessTest extends UnitTestCase
                     ],
                 ],
             ],
+            'meta' => [
+                'dataStructurePointers' => [
+                    'pointerField' => 'aFlex',
+                ],
+            ],
         ];
 
         $this->assertEquals($expected, $this->subject->addData($input));
@@ -802,6 +847,11 @@ class TcaFlexProcessTest extends UnitTestCase
                     ],
                 ],
             ],
+            'meta' => [
+                'dataStructurePointers' => [
+                    'pointerField' => 'aFlex',
+                ],
+            ],
         ];
 
         $this->assertEquals($expected, $this->subject->addData($input));
@@ -864,6 +914,11 @@ class TcaFlexProcessTest extends UnitTestCase
         $this->backendUserProphecy->checkLanguageAccess(Argument::cetera())->willReturn(true);
 
         $expected = $input;
+        $expected['processedTca']['columns']['aField']['config']['ds']['meta'] = [
+            'dataStructurePointers' => [
+                'pointerField' => 'aFlex'
+            ],
+        ];
         $expected['databaseRow']['aField']['data']['sDEF']['lDEF']['aFlexField']['vDEF'] = 'defaultValue';
 
         $this->assertEquals($expected, $this->subject->addData($input));