[BUGFIX] Tests: Incomplete Mocking in ext:extensionmanager 12/28412/2
authorAnja Leichsenring <aleichsenring@ab-softlab.de>
Sat, 15 Mar 2014 10:51:14 +0000 (11:51 +0100)
committerThomas Maroschik <tmaroschik@dfau.de>
Sat, 15 Mar 2014 11:22:00 +0000 (12:22 +0100)
After the removal of GLOBALS initialisation the extension raises
warnings in unittests.

Change-Id: I450932b1de1852302e4ae9861b250c5721f6032e
Resolves: #56930
Related: #51436
Releases: 6.2
Reviewed-on: https://review.typo3.org/28412
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
Reviewed-by: Thomas Maroschik
Tested-by: Thomas Maroschik
typo3/sysext/extensionmanager/Tests/Unit/Domain/Repository/ConfigurationItemRepositoryTest.php

index 3ea9baa..7134a0e 100644 (file)
@@ -63,6 +63,10 @@ class ConfigurationItemRepositoryTest extends \TYPO3\CMS\Extbase\Tests\Unit\Base
         * @test
         */
        public function getConfigurationArrayFromExtensionKeyReturnsSortedHierarchicArray() {
+               // due to a static call to LocalisationUtility, that ends up in RootlineUtility, we need to provide this
+               // otherwise a warning is raised
+               // 'Invalid argument supplied for foreach()' in typo3/sysext/core/Classes/Utility/RootlineUtility.php:263
+               $GLOBALS['TCA']['pages']['columns'] = array();
                $flatConfigurationItemArray = array(
                        'item1' => array(
                                'cat' => 'basic',