[TASK] UriBuilder can handle multidim arrays in exludes params
authorAnja Leichsenring <aleichsenring@ab-softlab.de>
Sat, 13 Apr 2013 18:31:06 +0000 (20:31 +0200)
committerAnja Leichsenring <aleichsenring@ab-softlab.de>
Sat, 13 Apr 2013 19:44:12 +0000 (21:44 +0200)
Add test to prove the ability of the UriBuilder to handle
multidimensional arrays as excludeArgument provider.

Resolves: #9843
Releases: 6.1
Change-Id: I3190668cd7bae50d424d5d66ce7322083ba24362
Reviewed-on: https://review.typo3.org/19849
Reviewed-by: Stefan Froemken
Tested-by: Stefan Froemken
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
Reviewed-by: Anja Leichsenring
Tested-by: Anja Leichsenring
typo3/sysext/extbase/Tests/Unit/Mvc/Web/Routing/UriBuilderTest.php

index 938d92d..7bed74e 100644 (file)
@@ -200,9 +200,60 @@ class UriBuilderTest extends \TYPO3\CMS\Extbase\Tests\Unit\BaseTestCase {
         */
        public function buildBackendUriRemovesSpecifiedQueryParametersIfArgumentsToBeExcludedFromQueryStringIsSetDataProvider() {
                return array(
-                       'Arguments to be excluded in the beginning' => array(array('M' => 'moduleKey', 'id' => 'pageId', 'foo' => 'bar'), array('M', 'id'), 'mod.php?foo=bar'),
-                       'Arguments to be excluded in the end' => array(array('foo' => 'bar', 'id' => 'pageId', 'M' => 'moduleKey'), array('M', 'id'), 'mod.php?foo=bar'),
-                       'Arguments in nested array to be excluded' => array(array('tx_foo' => array('bar' => 'baz'), 'id' => 'pageId', 'M' => 'moduleKey'), array('id', 'tx_foo[bar]'), 'mod.php?M=moduleKey'),
+                       'Arguments to be excluded in the beginning' => array(
+                               array(
+                                       'M' => 'moduleKey',
+                                       'id' => 'pageId',
+                                       'foo' => 'bar'
+                               ),
+                               array(
+                                       'M',
+                                       'id'
+                               ),
+                               'mod.php?foo=bar'
+                       ),
+                       'Arguments to be excluded in the end' => array(
+                               array(
+                                       'foo' => 'bar',
+                                       'id' => 'pageId',
+                                       'M' => 'moduleKey'
+                               ),
+                               array(
+                                       'M',
+                                       'id'
+                               ),
+                               'mod.php?foo=bar'
+                       ),
+                       'Arguments in nested array to be excluded' => array(
+                               array(
+                                       'tx_foo' => array(
+                                               'bar' => 'baz'
+                                       ),
+                                       'id' => 'pageId',
+                                       'M' => 'moduleKey'
+                               ),
+                               array(
+                                       'id',
+                                       'tx_foo[bar]'
+                               ),
+                               'mod.php?M=moduleKey'
+                       ),
+                       'Arguments in multidimensional array to be excluded' => array(
+                               array(
+                                       'tx_foo' => array(
+                                               'bar' => array(
+                                                       'baz' => 'bay'
+                                               )
+                                       ),
+                                       'id' => 'pageId',
+                                       'M' => 'moduleKey'
+                               ),
+                               array(
+                                       'id',
+                                       'tx_foo[bar][baz]'
+                               ),
+                               'mod.php?M=moduleKey'
+                       ),
                );
        }