[TASK] Add additional test to ArrayUtility::getValueByPath() 63/56963/2
authorChristian Kuhn <lolli@schwarzbu.ch>
Tue, 15 May 2018 08:29:56 +0000 (10:29 +0200)
committerMarkus Klein <markus.klein@typo3.org>
Tue, 15 May 2018 09:08:53 +0000 (11:08 +0200)
Verify getValueByPath() can return a sub part of a given array.

Resolves: #85009
Releases: master
Change-Id: Idc77809b960534d2b2694002c792f42d710ffa81
Reviewed-on: https://review.typo3.org/56963
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Tested-by: Markus Klein <markus.klein@typo3.org>
typo3/sysext/core/Tests/Unit/Utility/ArrayUtilityTest.php

index c953e92..c087c6a 100644 (file)
@@ -423,6 +423,19 @@ class ArrayUtilityTest extends UnitTestCase
                 'foo/baz',
                 $testObject
             ],
+            'sub array' => [
+                [
+                    'foo' => [
+                        'bar' => [
+                            'baz' => 42,
+                        ],
+                    ],
+                ],
+                'foo/bar',
+                [
+                    'baz' => 42,
+                ],
+            ],
             'enclosed path' => [
                 [
                     'foo/bar' => [