TYPO3 CMS  TYPO3_8-7
RequestBuilderTest.php
Go to the documentation of this file.
1 <?php
3 
4 /*
5  * This file is part of the TYPO3 CMS project.
6  *
7  * It is free software; you can redistribute it and/or modify it under
8  * the terms of the GNU General Public License, either version 2
9  * of the License, or any later version.
10  *
11  * For the full copyright and license information, please read the
12  * LICENSE.txt file that was distributed with this source code.
13  *
14  * The TYPO3 project - inspiring people to share!
15  */
20 
24 class RequestBuilderTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
25 {
29  protected $requestBuilder;
30 
35 
39  protected $configuration;
40 
44  protected $mockObjectManager;
45 
50 
55 
59  protected $mockRequest;
60 
61  protected function setUp()
62  {
63  $this->requestBuilder = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Mvc\Web\RequestBuilder::class, ['dummy']);
64  $this->configuration = [
65  'userFunc' => 'Tx_Extbase_Dispatcher->dispatch',
66  'pluginName' => 'Pi1',
67  'extensionName' => 'MyExtension',
68  'controller' => 'TheFirstController',
69  'action' => 'show',
70  'controllerConfiguration' => [
71  'TheFirstController' => [
72  'actions' => ['show', 'index', 'new', 'create', 'delete', 'edit', 'update', 'setup', 'test']
73  ],
74  'TheSecondController' => [
75  'actions' => ['show', 'index']
76  ],
77  'TheThirdController' => [
78  'actions' => ['delete', 'create', 'onlyInThirdController']
79  ]
80  ]
81  ];
82  $this->mockConfigurationManager = $this->createMock(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::class);
83  $this->mockRequest = $this->createMock(\TYPO3\CMS\Extbase\Mvc\Web\Request::class);
84  $this->mockObjectManager = $this->createMock(\TYPO3\CMS\Extbase\Object\ObjectManagerInterface::class);
85  $this->mockExtensionService = $this->createMock(\TYPO3\CMS\Extbase\Service\ExtensionService::class);
86  $this->mockEnvironmentService = $this->getMockBuilder(\TYPO3\CMS\Extbase\Service\EnvironmentService::class)
87  ->setMethods(['getServerRequestMethod'])
88  ->getMock();
89  }
90 
93  protected function injectDependencies()
94  {
95  $this->mockConfigurationManager->expects($this->any())->method('getConfiguration')->will($this->returnValue($this->configuration));
96  $this->requestBuilder->_set('configurationManager', $this->mockConfigurationManager);
97  $this->mockObjectManager->expects($this->any())->method('get')->with(\TYPO3\CMS\Extbase\Mvc\Web\Request::class)->will($this->returnValue($this->mockRequest));
98  $this->requestBuilder->_set('objectManager', $this->mockObjectManager);
99  $pluginNamespace = 'tx_' . strtolower(($this->configuration['extensionName'] . '_' . $this->configuration['pluginName']));
100  $this->mockExtensionService->expects($this->any())->method('getPluginNamespace')->will($this->returnValue($pluginNamespace));
101  $this->requestBuilder->_set('extensionService', $this->mockExtensionService);
102  $this->mockEnvironmentService->expects($this->any())->method('getServerRequestMethod')->will($this->returnValue('GET'));
103  $this->requestBuilder->_set('environmentService', $this->mockEnvironmentService);
104  }
105 
110  {
111  $this->injectDependencies();
112  $request = $this->requestBuilder->build();
113  $this->assertSame($this->mockRequest, $request);
114  }
115 
119  public function buildSetsRequestPluginName()
120  {
121  $this->injectDependencies();
122  $this->mockRequest->expects($this->once())->method('setPluginName')->with('Pi1');
123  $this->requestBuilder->build();
124  }
125 
130  {
131  $this->injectDependencies();
132  $this->mockRequest->expects($this->once())->method('setControllerExtensionName')->with('MyExtension');
133  $this->requestBuilder->build();
134  }
135 
140  {
141  $this->injectDependencies();
142  $this->mockRequest->expects($this->once())->method('setControllerName')->with('TheFirstController');
143  $this->requestBuilder->build();
144  }
145 
150  {
151  $this->injectDependencies();
152  $this->mockRequest->expects($this->once())->method('setControllerActionName')->with('show');
153  $this->requestBuilder->build();
154  }
155 
159  public function buildSetsRequestRequestUri()
160  {
161  $this->injectDependencies();
162  $expectedRequestUri = \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_REQUEST_URL');
163  $this->mockRequest->expects($this->once())->method('setRequestUri')->with($expectedRequestUri);
164  $this->requestBuilder->build();
165  }
166 
170  public function buildSetsRequestBaseUri()
171  {
172  $this->injectDependencies();
173  $expectedBaseUri = \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_SITE_URL');
174  $this->mockRequest->expects($this->once())->method('setBaseUri')->with($expectedBaseUri);
175  $this->requestBuilder->build();
176  }
177 
181  public function buildSetsRequestMethod()
182  {
183  $this->injectDependencies();
184  $expectedMethod = 'SomeRequestMethod';
185  $mockEnvironmentService = $this->getMockBuilder(\TYPO3\CMS\Extbase\Service\EnvironmentService::class)
186  ->setMethods(['getServerRequestMethod'])
187  ->getMock();
188  $mockEnvironmentService->expects($this->once())->method('getServerRequestMethod')->will($this->returnValue($expectedMethod));
189  $this->requestBuilder->_set('environmentService', $mockEnvironmentService);
190  $this->mockRequest->expects($this->once())->method('setMethod')->with($expectedMethod);
191  $this->requestBuilder->build();
192  }
193 
198  {
199  $this->injectDependencies();
200  $expectedVendor = 'Vendor';
201  $this->configuration['vendorName'] = $expectedVendor;
202  $mockConfigurationManager = $this->createMock(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::class);
203  $mockConfigurationManager->expects($this->any())->method('getConfiguration')->will($this->returnValue($this->configuration));
204  $this->requestBuilder->_set('configurationManager', $mockConfigurationManager);
205  $this->requestBuilder->_set('extensionService', $this->mockExtensionService);
206  $this->mockRequest->expects($this->once())->method('setControllerVendorName')->with($expectedVendor);
207  $this->requestBuilder->build();
208  }
209 
214  {
215  $this->injectDependencies();
216  $expectedVendor = 'Vendor';
217  $this->configuration['vendorName'] = $expectedVendor;
218 
219  $mockConfigurationManager = $this->createMock(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::class);
220  $mockConfigurationManager->expects($this->any())->method('getConfiguration')->will($this->returnValue($this->configuration));
221  $this->requestBuilder->_set('configurationManager', $mockConfigurationManager);
222  $this->mockRequest->expects($this->once())->method('setControllerVendorName')->with($expectedVendor);
223 
224  $this->requestBuilder->build();
225 
226  unset($this->configuration['vendorName']);
227  $mockConfigurationManager = $this->createMock(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::class);
228  $mockConfigurationManager->expects($this->any())->method('getConfiguration')->will($this->returnValue($this->configuration));
229  $this->requestBuilder->_set('configurationManager', $mockConfigurationManager);
230 
231  $this->mockRequest->expects($this->never())->method('setControllerVendorName');
232  $this->requestBuilder->build();
233  }
234 
239  {
240  $this->expectException(Exception::class);
241  $this->expectExceptionCode(1289843275);
242  unset($this->configuration['extensionName']);
243  $mockConfigurationManager = $this->createMock(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::class);
244  $mockConfigurationManager->expects($this->any())->method('getConfiguration')->will($this->returnValue($this->configuration));
245  $this->requestBuilder->_set('configurationManager', $mockConfigurationManager);
246  $this->requestBuilder->build();
247  }
248 
253  {
254  $this->expectException(Exception::class);
255  $this->expectExceptionCode(1289843277);
256  unset($this->configuration['pluginName']);
257  $mockConfigurationManager = $this->createMock(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::class);
258  $mockConfigurationManager->expects($this->any())->method('getConfiguration')->will($this->returnValue($this->configuration));
259  $this->requestBuilder->_set('configurationManager', $mockConfigurationManager);
260  $this->requestBuilder->_set('extensionService', $this->mockExtensionService);
261  $this->requestBuilder->build();
262  }
263 
268  {
269  $this->expectException(Exception::class);
270  $this->expectExceptionCode(1316104317);
271  $this->configuration['controllerConfiguration'] = [];
272  $this->mockConfigurationManager->expects($this->any())->method('getConfiguration')->will($this->returnValue($this->configuration));
273  $this->requestBuilder->_set('configurationManager', $this->mockConfigurationManager);
274  $this->requestBuilder->_set('extensionService', $this->mockExtensionService);
275  $this->requestBuilder->build();
276  }
277 
282  {
283  $this->expectException(Exception::class);
284  $this->expectExceptionCode(1295479651);
285  $this->configuration['controllerConfiguration']['TheFirstController'] = [];
286  $this->mockConfigurationManager->expects($this->any())->method('getConfiguration')->will($this->returnValue($this->configuration));
287  $this->requestBuilder->_set('configurationManager', $this->mockConfigurationManager);
288  $this->requestBuilder->_set('extensionService', $this->mockExtensionService);
289  $this->requestBuilder->build();
290  }
291 
296  {
297  $this->expectException(Exception::class);
298  $this->expectExceptionCode(1316104317);
299  $this->configuration['controllerConfiguration'] = [
300  '' => [
301  'actions' => ['foo']
302  ]
303  ];
304  $this->mockConfigurationManager->expects($this->any())->method('getConfiguration')->will($this->returnValue($this->configuration));
305  $this->requestBuilder->_set('configurationManager', $this->mockConfigurationManager);
306  $this->requestBuilder->_set('extensionService', $this->mockExtensionService);
307  $this->requestBuilder->build();
308  }
309 
314  {
315  $this->configuration['extensionName'] = 'SomeExtensionName';
316  $this->configuration['pluginName'] = 'SomePluginName';
317  $this->injectDependencies();
318  $_GET = [
319  'tx_someotherextensionname_somepluginname' => [
320  'foo' => 'bar'
321  ],
322  'tx_someextensionname_somepluginname' => [
323  'parameter1' => 'valueGetsOverwritten',
324  'parameter2' => [
325  'parameter3' => 'value3'
326  ]
327  ]
328  ];
329  $_POST = [
330  'tx_someextensionname_someotherpluginname' => [
331  'foo' => 'bar'
332  ],
333  'tx_someextensionname_somepluginname' => [
334  'parameter1' => 'value1',
335  'parameter2' => [
336  'parameter4' => 'value4'
337  ]
338  ]
339  ];
340  $this->mockRequest->expects($this->at(8))->method('setArgument')->with('parameter1', 'value1');
341  $this->mockRequest->expects($this->at(9))->method('setArgument')->with('parameter2', ['parameter3' => 'value3', 'parameter4' => 'value4']);
342  $this->requestBuilder->build();
343  }
344 
349  {
350  $this->configuration['extensionName'] = 'SomeExtensionName';
351  $this->configuration['pluginName'] = 'SomePluginName';
352  $this->injectDependencies();
353  $_GET = [
354  'tx_someextensionname_somepluginname' => [
355  'format' => 'GET'
356  ]
357  ];
358  $_POST = [
359  'tx_someextensionname_somepluginname' => [
360  'format' => 'POST'
361  ]
362  ];
363  $this->mockRequest->expects($this->at(7))->method('setFormat')->with('POST');
364  $this->requestBuilder->build();
365  }
366 
371  {
372  $this->injectDependencies();
373  $expectedResult = [
374  'TheFirstController' => [
375  'show',
376  'index',
377  'new',
378  'create',
379  'delete',
380  'edit',
381  'update',
382  'setup',
383  'test'
384  ],
385  'TheSecondController' => [
386  'show',
387  'index'
388  ],
389  'TheThirdController' => [
390  'delete',
391  'create',
392  'onlyInThirdController'
393  ]
394  ];
395  $this->requestBuilder->build();
396  $actualResult = $this->requestBuilder->_get('allowedControllerActions');
397  $this->assertEquals($expectedResult, $actualResult);
398  }
399 
404  {
405  $this->expectException(Exception::class);
406  $this->expectExceptionCode(1316104317);
407  $this->configuration['controllerConfiguration'] = [];
408  $this->mockConfigurationManager->expects($this->any())->method('getConfiguration')->will($this->returnValue($this->configuration));
409  $this->requestBuilder->_set('configurationManager', $this->mockConfigurationManager);
410  $this->mockExtensionService->expects($this->any())->method('getPluginNamespace')->will($this->returnValue('tx_myextension_pi1'));
411  $this->requestBuilder->_set('extensionService', $this->mockExtensionService);
412  $this->requestBuilder->build();
413  }
414 
419  {
420  $this->injectDependencies();
421  $_GET = [
422  'tx_myextension_pi1' => [
423  'foo' => 'bar'
424  ]
425  ];
426  $this->mockRequest->expects($this->once())->method('setControllerName')->with('TheFirstController');
427  $this->requestBuilder->build();
428  }
429 
434  {
435  $this->injectDependencies();
436  $_GET = [
437  'tx_myextension_pi1' => [
438  'controller' => 'TheSecondController'
439  ]
440  ];
441  $this->mockRequest->expects($this->once())->method('setControllerName')->with('TheSecondController');
442  $this->requestBuilder->build();
443  }
444 
449  {
450  $this->expectException(InvalidControllerNameException::class);
451  $this->expectExceptionCode(1313855173);
452  $this->mockConfigurationManager->expects($this->any())->method('getConfiguration')->will($this->returnValue($this->configuration));
453  $this->requestBuilder->_set('configurationManager', $this->mockConfigurationManager);
454  $this->mockExtensionService->expects($this->any())->method('getPluginNamespace')->will($this->returnValue('tx_myextension_pi1'));
455  $this->requestBuilder->_set('extensionService', $this->mockExtensionService);
456  $_GET = [
457  'tx_myextension_pi1' => [
458  'controller' => 'SomeInvalidController'
459  ]
460  ];
461  $this->requestBuilder->build();
462  }
463 
468  {
469  $this->expectException(PageNotFoundException::class);
470  $this->expectExceptionCode(1313857897);
471  $this->configuration['mvc']['throwPageNotFoundExceptionIfActionCantBeResolved'] = 1;
472  $this->mockConfigurationManager->expects($this->any())->method('getConfiguration')->will($this->returnValue($this->configuration));
473  $this->requestBuilder->_set('configurationManager', $this->mockConfigurationManager);
474  $this->mockExtensionService->expects($this->any())->method('getPluginNamespace')->will($this->returnValue('tx_myextension_pi1'));
475  $this->requestBuilder->_set('extensionService', $this->mockExtensionService);
476  $_GET = [
477  'tx_myextension_pi1' => [
478  'controller' => 'SomeInvalidController'
479  ]
480  ];
481  $this->requestBuilder->build();
482  }
483 
488  {
489  $this->configuration['mvc']['callDefaultActionIfActionCantBeResolved'] = 1;
490  $this->injectDependencies();
491  $this->requestBuilder->_set('extensionService', $this->mockExtensionService);
492  $_GET = [
493  'tx_myextension_pi1' => [
494  'controller' => 'SomeInvalidController'
495  ]
496  ];
497  $this->mockRequest->expects($this->once())->method('setControllerName')->with('TheFirstController');
498  $this->requestBuilder->build();
499  }
500 
505  {
506  $this->expectException(Exception::class);
507  $this->expectExceptionCode(1316104317);
508  $this->configuration['controllerConfiguration'] = [];
509  $this->mockConfigurationManager->expects($this->any())->method('getConfiguration')->will($this->returnValue($this->configuration));
510  $this->requestBuilder->_set('configurationManager', $this->mockConfigurationManager);
511  $this->mockExtensionService->expects($this->any())->method('getPluginNamespace')->will($this->returnValue('tx_myextension_pi1'));
512  $this->requestBuilder->_set('extensionService', $this->mockExtensionService);
513  $this->requestBuilder->build();
514  }
515 
520  {
521  $this->injectDependencies();
522  $_GET = [
523  'tx_myextension_pi1' => [
524  'controller' => 'TheThirdController'
525  ]
526  ];
527  $this->mockRequest->expects($this->once())->method('setControllerActionName')->with('delete');
528  $this->requestBuilder->build();
529  }
530 
535  {
536  $this->injectDependencies();
537  $_GET = [
538  'tx_myextension_pi1' => [
539  'action' => 'create'
540  ]
541  ];
542  $this->mockRequest->expects($this->once())->method('setControllerActionName')->with('create');
543  $this->requestBuilder->build();
544  }
545 
550  {
551  $this->injectDependencies();
552  $_GET = [
553  'tx_myextension_pi1' => [
554  'controller' => 'TheThirdController',
555  'action' => 'onlyInThirdController'
556  ]
557  ];
558  $this->mockRequest->expects($this->once())->method('setControllerActionName')->with('onlyInThirdController');
559  $this->requestBuilder->build();
560  }
561 
566  {
567  $this->expectException(InvalidActionNameException::class);
568  $this->expectExceptionCode(1313855175);
569  $this->mockConfigurationManager->expects($this->any())->method('getConfiguration')->will($this->returnValue($this->configuration));
570  $this->requestBuilder->_set('configurationManager', $this->mockConfigurationManager);
571  $this->mockExtensionService->expects($this->any())->method('getPluginNamespace')->will($this->returnValue('tx_myextension_pi1'));
572  $this->requestBuilder->_set('extensionService', $this->mockExtensionService);
573  $_GET = [
574  'tx_myextension_pi1' => [
575  'action' => 'someInvalidAction'
576  ]
577  ];
578  $this->requestBuilder->build();
579  }
580 
585  {
586  $this->expectException(PageNotFoundException::class);
587  $this->expectExceptionCode(1313857898);
588  $this->configuration['mvc']['throwPageNotFoundExceptionIfActionCantBeResolved'] = 1;
589  $this->mockConfigurationManager->expects($this->any())->method('getConfiguration')->will($this->returnValue($this->configuration));
590  $this->requestBuilder->_set('configurationManager', $this->mockConfigurationManager);
591  $this->mockExtensionService->expects($this->any())->method('getPluginNamespace')->will($this->returnValue('tx_myextension_pi1'));
592  $this->requestBuilder->_set('extensionService', $this->mockExtensionService);
593  $_GET = [
594  'tx_myextension_pi1' => [
595  'action' => 'someInvalidAction'
596  ]
597  ];
598  $this->requestBuilder->build();
599  }
600 
605  {
606  $this->configuration['mvc']['callDefaultActionIfActionCantBeResolved'] = 1;
607  $this->injectDependencies();
608  $this->requestBuilder->_set('extensionService', $this->mockExtensionService);
609  $_GET = [
610  'tx_myextension_pi1' => [
611  'controller' => 'TheThirdController',
612  'action' => 'someInvalidAction'
613  ]
614  ];
615  $this->mockRequest->expects($this->once())->method('setControllerName')->with('TheThirdController');
616  $this->mockRequest->expects($this->once())->method('setControllerActionName')->with('delete');
617  $this->requestBuilder->build();
618  }
619 
625  {
626  $convolutedFiles = [
627  'a0' => [
628  'name' => [
629  'a1' => 'a.txt'
630  ],
631  'type' => [
632  'a1' => 'text/plain'
633  ],
634  'tmp_name' => [
635  'a1' => '/private/var/tmp/phpbqXsYt'
636  ],
637  'error' => [
638  'a1' => 0
639  ],
640  'size' => [
641  'a1' => 100
642  ]
643  ],
644  'b0' => [
645  'name' => [
646  'b1' => 'b.txt'
647  ],
648  'type' => [
649  'b1' => 'text/plain'
650  ],
651  'tmp_name' => [
652  'b1' => '/private/var/tmp/phpvZ6oUD'
653  ],
654  'error' => [
655  'b1' => 0
656  ],
657  'size' => [
658  'b1' => 200
659  ]
660  ],
661  'c' => [
662  'name' => 'c.txt',
663  'type' => 'text/plain',
664  'tmp_name' => '/private/var/tmp/phpS9KMNw',
665  'error' => 0,
666  'size' => 300
667  ],
668  'd0' => [
669  'name' => [
670  'd1' => [
671  0 => 'd12.txt',
672  'd2' => [
673  'd3' => 'd.txt'
674  ]
675  ]
676  ],
677  'type' => [
678  'd1' => [
679  0 => 'text/plain',
680  'd2' => [
681  'd3' => 'text/plain'
682  ]
683  ]
684  ],
685  'tmp_name' => [
686  'd1' => [
687  0 => '/private/var/tmp/phpMf9Qx9',
688  'd2' => [
689  'd3' => '/private/var/tmp/phprR3fax'
690  ]
691  ]
692  ],
693  'error' => [
694  'd1' => [
695  0 => 0,
696  'd2' => [
697  'd3' => 0
698  ]
699  ]
700  ],
701  'size' => [
702  'd1' => [
703  0 => 200,
704  'd2' => [
705  'd3' => 400
706  ]
707  ]
708  ]
709  ],
710  'e0' => [
711  'name' => [
712  'e1' => [
713  'e2' => [
714  0 => 'e_one.txt',
715  1 => 'e_two.txt'
716  ]
717  ]
718  ],
719  'type' => [
720  'e1' => [
721  'e2' => [
722  0 => 'text/plain',
723  1 => 'text/plain'
724  ]
725  ]
726  ],
727  'tmp_name' => [
728  'e1' => [
729  'e2' => [
730  0 => '/private/var/tmp/php01fitB',
731  1 => '/private/var/tmp/phpUUB2cv'
732  ]
733  ]
734  ],
735  'error' => [
736  'e1' => [
737  'e2' => [
738  0 => 0,
739  1 => 0
740  ]
741  ]
742  ],
743  'size' => [
744  'e1' => [
745  'e2' => [
746  0 => 510,
747  1 => 520
748  ]
749  ]
750  ]
751  ],
752  'error' => [
753  'name' => 'error_file.txt',
754  'type' => 'text/plain',
755  'tmp_name' => '/private/var/tmp/phpADDu87fE',
756  'error' => 0,
757  'size' => 120
758  ]
759  ];
760  $untangledFiles = [
761  'a0' => [
762  'a1' => [
763  'name' => 'a.txt',
764  'type' => 'text/plain',
765  'tmp_name' => '/private/var/tmp/phpbqXsYt',
766  'error' => 0,
767  'size' => 100
768  ]
769  ],
770  'b0' => [
771  'b1' => [
772  'name' => 'b.txt',
773  'type' => 'text/plain',
774  'tmp_name' => '/private/var/tmp/phpvZ6oUD',
775  'error' => 0,
776  'size' => 200
777  ]
778  ],
779  'c' => [
780  'name' => 'c.txt',
781  'type' => 'text/plain',
782  'tmp_name' => '/private/var/tmp/phpS9KMNw',
783  'error' => 0,
784  'size' => 300
785  ],
786  'd0' => [
787  'd1' => [
788  0 => [
789  'name' => 'd12.txt',
790  'type' => 'text/plain',
791  'tmp_name' => '/private/var/tmp/phpMf9Qx9',
792  'error' => 0,
793  'size' => 200
794  ],
795  'd2' => [
796  'd3' => [
797  'name' => 'd.txt',
798  'type' => 'text/plain',
799  'tmp_name' => '/private/var/tmp/phprR3fax',
800  'error' => 0,
801  'size' => 400
802  ]
803  ]
804  ]
805  ],
806  'e0' => [
807  'e1' => [
808  'e2' => [
809  0 => [
810  'name' => 'e_one.txt',
811  'type' => 'text/plain',
812  'tmp_name' => '/private/var/tmp/php01fitB',
813  'error' => 0,
814  'size' => 510
815  ],
816  1 => [
817  'name' => 'e_two.txt',
818  'type' => 'text/plain',
819  'tmp_name' => '/private/var/tmp/phpUUB2cv',
820  'error' => 0,
821  'size' => 520
822  ]
823  ]
824  ]
825  ] ,
826  'error' => [
827  'name' => 'error_file.txt',
828  'type' => 'text/plain',
829  'tmp_name' => '/private/var/tmp/phpADDu87fE',
830  'error' => 0,
831  'size' => 120
832  ]
833  ];
834  $requestBuilder = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Mvc\Web\RequestBuilder::class, ['dummy'], [], '', false);
835  $result = $requestBuilder->_call('untangleFilesArray', $convolutedFiles);
836  $this->assertSame($untangledFiles, $result);
837  }
838 }