diff --git a/typo3/sysext/fluid/Classes/ViewHelpers/FormViewHelper.php b/typo3/sysext/fluid/Classes/ViewHelpers/FormViewHelper.php index 8e0c53de94320b1f116c41ca3b2e5eea8ab3e7c7..730f4e633cea7674937c342099c11e148ae3fd3c 100644 --- a/typo3/sysext/fluid/Classes/ViewHelpers/FormViewHelper.php +++ b/typo3/sysext/fluid/Classes/ViewHelpers/FormViewHelper.php @@ -395,28 +395,6 @@ class FormViewHelper extends AbstractFormViewHelper } } - /** - * Add the URI arguments after postprocessing to the request hash as well. - * @param array $arguments - * @param array $results - * @param string $currentPrefix - * @param int $level - */ - protected function postProcessUriArgumentsForRequestHash($arguments, &$results, $currentPrefix = '', $level = 0) - { - if (count($arguments)) { - foreach ($arguments as $argumentName => $argumentValue) { - $argumentName = (string)$argumentName; - if (is_array($argumentValue)) { - $prefix = $level == 0 ? $argumentName : $currentPrefix . '[' . $argumentName . ']'; - $this->postProcessUriArgumentsForRequestHash($argumentValue, $results, $prefix, $level + 1); - } else { - $results[] = $level == 0 ? $argumentName : $currentPrefix . '[' . $argumentName . ']'; - } - } - } - } - /** * Retrieves the default field name prefix for this form * diff --git a/typo3/sysext/fluid/Tests/Unit/ViewHelpers/FormViewHelperTest.php b/typo3/sysext/fluid/Tests/Unit/ViewHelpers/FormViewHelperTest.php deleted file mode 100644 index c95f4de7fae279be03ad33cee487de28d22c1e93..0000000000000000000000000000000000000000 --- a/typo3/sysext/fluid/Tests/Unit/ViewHelpers/FormViewHelperTest.php +++ /dev/null @@ -1,76 +0,0 @@ -<?php - -declare(strict_types=1); - -/* - * This file is part of the TYPO3 CMS project. - * - * It is free software; you can redistribute it and/or modify it under - * the terms of the GNU General Public License, either version 2 - * of the License, or any later version. - * - * For the full copyright and license information, please read the - * LICENSE.txt file that was distributed with this source code. - * - * The TYPO3 project - inspiring people to share! - */ - -namespace TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers; - -use TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper; -use TYPO3\TestingFramework\Core\Unit\UnitTestCase; - -class FormViewHelperTest extends UnitTestCase -{ - /** - * Data Provider for postProcessUriArgumentsForRequestHashWorks - */ - public function argumentsForPostProcessUriArgumentsForRequestHash(): array - { - return [ - // simple values - [ - [ - 'bla' => 'X', - 'blubb' => 'Y', - ], - [ - 'bla', - 'blubb', - ], - ], - // Arrays - [ - [ - 'bla' => [ - 'test1' => 'X', - 'test2' => 'Y', - ], - 'blubb' => 'Y', - ], - [ - 'bla[test1]', - 'bla[test2]', - 'blubb', - ], - ], - ]; - } - - /** - * @test - * @dataProvider argumentsForPostProcessUriArgumentsForRequestHash - * @param $arguments - * @param $expectedResults - */ - public function postProcessUriArgumentsForRequestHashWorks($arguments, $expectedResults): void - { - $formViewHelper = new FormViewHelper(); - $results = []; - $mock = \Closure::bind(static function (FormViewHelper $formViewHelper) use ($arguments, &$results) { - return $formViewHelper->postProcessUriArgumentsForRequestHash($arguments, $results); - }, null, FormViewHelper::class); - $mock($formViewHelper); - self::assertEquals($expectedResults, $results); - } -}