[TASK] Namespace and move t3lib unit tests - 1
authorChristian Kuhn <lolli@schwarzbu.ch>
Sun, 26 Aug 2012 21:40:25 +0000 (23:40 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Sun, 26 Aug 2012 23:56:24 +0000 (01:56 +0200)
This patch moves most unit tests of the tests/Unit/t3lib/ main
directory. They follow the new class names of the classes under
test and are namespaced. Covered are files that belong to the
backend and core extension.
The travis test configuration is adapted to execute tests
located in those extension folders.

Change-Id: Ibda0cb72596a418a3f97eeba83f39428a4d0d532
Resolves: #40247
Related: #40095
Releases: 6.0
Reviewed-on: http://review.typo3.org/14123
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
43 files changed:
tests/Build/UnitTests.xml
tests/Unit/t3lib/class.t3lib_ConfigurationTest.php [deleted file]
tests/Unit/t3lib/class.t3lib_autoloaderTest.php [deleted file]
tests/Unit/t3lib/class.t3lib_befuncTest.php [deleted file]
tests/Unit/t3lib/class.t3lib_beuserauthTest.php [deleted file]
tests/Unit/t3lib/class.t3lib_csTest.php [deleted file]
tests/Unit/t3lib/class.t3lib_dbTest.php [deleted file]
tests/Unit/t3lib/class.t3lib_divTest.php [deleted file]
tests/Unit/t3lib/class.t3lib_extfilefuncTest.php [deleted file]
tests/Unit/t3lib/class.t3lib_extmgmTest.php [deleted file]
tests/Unit/t3lib/class.t3lib_iconWorksTest.php [deleted file]
tests/Unit/t3lib/class.t3lib_lockTest.php [deleted file]
tests/Unit/t3lib/class.t3lib_pagerendererTest.php [deleted file]
tests/Unit/t3lib/class.t3lib_parsehtml_procTest.php [deleted file]
tests/Unit/t3lib/class.t3lib_registryTest.php [deleted file]
tests/Unit/t3lib/class.t3lib_rootlineTest.php [deleted file]
tests/Unit/t3lib/class.t3lib_spritemanagerTest.php [deleted file]
tests/Unit/t3lib/class.t3lib_sqlparserTest.php [deleted file]
tests/Unit/t3lib/class.t3lib_tcemainTest.php [deleted file]
tests/Unit/t3lib/class.t3lib_tstemplateTest.php [deleted file]
tests/Unit/t3lib/class.t3lib_userauthTest.php [deleted file]
tests/Unit/t3lib/fixtures/AccessibleRootline.php [deleted file]
typo3/sysext/backend/Tests/Unit/Sprite/SpriteManagerTest.php [new file with mode: 0644]
typo3/sysext/backend/Tests/Unit/Utility/BackendUtilityTest.php [new file with mode: 0644]
typo3/sysext/backend/Tests/Unit/Utility/IconUtilityTest.php [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/Authentication/AbstractUserAuthenticationTest.php [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/Authentication/BackendUserAuthenticationTest.php [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/AutoloaderTest.php [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/Charset/CharsetConverterTest.php [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/Configuration/ConfigurationManagerTest.php [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/DataHandler/DataHandlerTest.php [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/Database/DatabaseConnectionTest.php [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/Database/SqlParserTest.php [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/Extension/ExtensionManagerTest.php [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/Html/RteHtmlParserTest.php [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/Locking/LockerTest.php [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/Page/PageRendererTest.php [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/RegistryTest.php [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/TypoScript/TemplateServiceTest.php [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/Utility/File/ExtendedFileUtilityTest.php [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/Utility/Fixtures/AccessibleRootline.php [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/Utility/GeneralUtilityTest.php [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/Utility/RootlineUtilityTest.php [new file with mode: 0644]

index 048b699..eb33083 100644 (file)
        verbose="false">
 
        <testsuites>
+               <testsuite name="EXT:core Tests">
+                       <directory>../../typo3/sysext/core/Tests/Unit/</directory>
+               </testsuite>
+               <testsuite name="EXT:backend Tests">
+                       <directory>../../typo3/sysext/backend/Tests/Unit/</directory>
+               </testsuite>
                <testsuite name="Core Tests">
                        <directory>../../tests/Unit/</directory>
                </testsuite>
-               <testsuite name="Beuser Tests">
+               <testsuite name="EXT:beuser Tests">
                        <directory>../../typo3/sysext/beuser/Tests/Unit/</directory>
                </testsuite>
-               <testsuite name="Extbase Tests">
+               <testsuite name="EXT:extbase Tests">
                        <directory>../../typo3/sysext/extbase/Tests/Unit/</directory>
                </testsuite>
-               <testsuite name="Fluid Tests">
+               <testsuite name="EXT:fluid Tests">
                        <directory>../../typo3/sysext/fluid/Tests/Unit/</directory>
                </testsuite>
        </testsuites>
diff --git a/tests/Unit/t3lib/class.t3lib_ConfigurationTest.php b/tests/Unit/t3lib/class.t3lib_ConfigurationTest.php
deleted file mode 100644 (file)
index 3a84896..0000000
+++ /dev/null
@@ -1,235 +0,0 @@
-<?php
-/***************************************************************
- *  Copyright notice
- *
- *  (c) 2012 Christian Kuhn <lolli@schwarzbu.ch>
- *  All rights reserved
- *
- *  This script is part of the TYPO3 project. The TYPO3 project is
- *  free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  The GNU General Public License can be found at
- *  http://www.gnu.org/copyleft/gpl.html.
- *
- *  This script is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  This copyright notice MUST APPEAR in all copies of the script!
- ***************************************************************/
-/**
- * Testcase for class \TYPO3\CMS\Core\Configuration\ConfigurationManager
- *
- * @author Christian Kuhn <lolli@schwarzbu.ch>
- * @package TYPO3
- * @subpackage t3lib
- */
-class t3lib_ConfigurationTest extends tx_phpunit_testcase {
-
-       /**
-        * Absolute path to files that must be removed
-        * after a test - handled in tearDown
-        */
-       protected $testFilesToDelete = array();
-
-       /**
-        * Tear down test case
-        */
-       public function tearDown() {
-               foreach ($this->testFilesToDelete as $absoluteFileName) {
-                       \TYPO3\CMS\Core\Utility\GeneralUtility::unlink_tempfile($absoluteFileName);
-               }
-       }
-
-       #######################
-       # Tests concerning getDefaultConfiguration
-       #######################
-       /**
-        * @test
-        * @expectedException RuntimeException
-        */
-       public function getDefaultConfigurationExecutesDefinedDefaultConfigurationFile() {
-               $defaultConfigurationFile = 'typo3temp/' . uniqid('defaultConfiguration');
-               $namespace = 'TYPO3\\CMS\\Core\\Configuration';
-               $className = uniqid('ConfigurationManager');
-               eval(((((('namespace ' . $namespace . '; class ' . $className) . ' extends \\TYPO3\\CMS\\Core\\Configuration\\ConfigurationManager {') . '  const DEFAULT_CONFIGURATION_FILE = \'') . $defaultConfigurationFile) . '\';') . '}');
-               $className = $namespace . '\\' . $className;
-               file_put_contents(PATH_site . $defaultConfigurationFile, '<?php
-
-throw new RuntimeException(\'foo\', 1310203814);
-
-?>');
-               $this->testFilesToDelete[] = PATH_site . $defaultConfigurationFile;
-               $className::getDefaultConfiguration();
-       }
-
-       #######################
-       # Tests concerning getLocalConfiguration
-       #######################
-       /**
-        * @test
-        * @expectedException RuntimeException
-        */
-       public function getLocalConfigurationExecutesDefinedConfigurationFile() {
-               $configurationFile = 'typo3temp/' . uniqid('localConfiguration');
-               $namespace = 'TYPO3\\CMS\\Core\\Configuration';
-               $className = uniqid('ConfigurationManager');
-               eval(((((('namespace ' . $namespace . '; class ' . $className) . ' extends \\TYPO3\\CMS\\Core\\Configuration\\ConfigurationManager {') . '  const LOCAL_CONFIGURATION_FILE = \'') . $configurationFile) . '\';') . '}');
-               $className = $namespace . '\\' . $className;
-               file_put_contents(PATH_site . $configurationFile, '<?php
-
-throw new RuntimeException(\'foo\', 1310203815);
-
-?>');
-               $this->testFilesToDelete[] = PATH_site . $configurationFile;
-               $className::getLocalConfiguration();
-       }
-
-       #######################
-       # Tests concerning updateLocalConfiguration
-       #######################
-       /**
-        * @test
-        */
-       public function updateLocalConfigurationWritesNewMergedLocalConfigurationArray() {
-               $namespace = 'TYPO3\\CMS\\Core\\Configuration';
-               $className = uniqid('ConfigurationManager');
-               eval(((((((((((((((((((('namespace ' . $namespace . '; class ' . $className) . ' extends \\TYPO3\\CMS\\Core\\Configuration\\ConfigurationManager {') . '  public static function getLocalConfiguration() {') . '    $currentLocalConfiguration = array(') . '      \'notChanged\' => 23,') . '      \'changed\' => \'unChanged\',') . '    );') . '    return $currentLocalConfiguration;') . '  }') . '  public static function writeLocalConfiguration($conf) {') . '    $expectedConfiguration = array(') . '      \'notChanged\' => 23,') . '      \'changed\' => \'changed\',') . '      \'new\' => \'new\',') . '    );') . '    if (!($conf === $expectedConfiguration)) {') . '      throw new Exception(\'broken\');') . '    }') . '  }') . '}');
-               $className = $namespace . '\\' . $className;
-               $overrideConfiguration = array(
-                       'changed' => 'changed',
-                       'new' => 'new'
-               );
-               $className::updateLocalConfiguration($overrideConfiguration);
-       }
-
-       #######################
-       # Tests concerning getDefaultConfigurationValueByPath
-       #######################
-       /**
-        * @test
-        */
-       public function getDefaultConfigurationValueByPathReturnsCorrectValue() {
-               $namespace = 'TYPO3\\CMS\\Core\\Configuration';
-               $className = uniqid('ConfigurationManager');
-               eval(((((('namespace ' . $namespace . '; class ' . $className) . ' extends \\TYPO3\\CMS\\Core\\Configuration\\ConfigurationManager {') . '  public static function getDefaultConfiguration() {') . '    return array(\'path\' => \'value\');') . '  }') . '}');
-               $className = $namespace . '\\' . $className;
-               $this->assertSame('value', $className::getDefaultConfigurationValueByPath('path'));
-       }
-
-       #######################
-       # Tests concerning getLocalConfigurationValueByPath
-       #######################
-       /**
-        * @test
-        */
-       public function getLocalConfigurationValueByPathReturnsCorrectValue() {
-               $namespace = 'TYPO3\\CMS\\Core\\Configuration';
-               $className = uniqid('ConfigurationManager');
-               eval(((((('namespace ' . $namespace . '; class ' . $className) . ' extends \\TYPO3\\CMS\\Core\\Configuration\\ConfigurationManager {') . '  public static function getLocalConfiguration() {') . '    return array(\'path\' => \'value\');') . '  }') . '}');
-               $className = $namespace . '\\' . $className;
-               $this->assertSame('value', $className::getLocalConfigurationValueByPath('path'));
-       }
-
-       #######################
-       # Tests concerning getConfigurationValueByPath
-       #######################
-       /**
-        * @test
-        */
-       public function getConfigurationValueByPathReturnsCorrectValue() {
-               $namespace = 'TYPO3\\CMS\\Core\\Configuration';
-               $className = uniqid('ConfigurationManager');
-               eval((((((((('namespace ' . $namespace . '; class ' . $className) . ' extends \\TYPO3\\CMS\\Core\\Configuration\\ConfigurationManager {') . '  public static function getDefaultConfiguration() {') . '    return array(\'path\' => \'value\');') . '  }') . '  public static function getLocalConfiguration() {') . '    return array(\'path\' => \'valueOverride\');') . '  }') . '}');
-               $className = $namespace . '\\' . $className;
-               $this->assertSame('valueOverride', $className::getConfigurationValueByPath('path'));
-       }
-
-       #######################
-       # Tests concerning setLocalConfigurationValueByPath
-       #######################
-       /**
-        * @test
-        */
-       public function setLocalConfigurationValueByPathReturnFalseIfPathIsNotValid() {
-               $namespace = 'TYPO3\\CMS\\Core\\Configuration';
-               $className = uniqid('ConfigurationManager');
-               eval(((((('namespace ' . $namespace . '; class ' . $className) . ' extends \\TYPO3\\CMS\\Core\\Configuration\\ConfigurationManager {') . '  public static function isValidLocalConfigurationPath() {') . '    return FALSE;') . '  }') . '}');
-               $className = $namespace . '\\' . $className;
-               $this->assertFalse($className::setLocalConfigurationValueByPath('path'));
-       }
-
-       /**
-        * @test
-        */
-       public function setLocalConfigurationValueByPathUpdatesValueDefinedByPath() {
-               $namespace = 'TYPO3\\CMS\\Core\\Configuration';
-               $className = uniqid('ConfigurationManager');
-               eval((((((((((((((((((((((('namespace ' . $namespace . '; class ' . $className) . ' extends \\TYPO3\\CMS\\Core\\Configuration\\ConfigurationManager {') . '  public static function isValidLocalConfigurationPath() {') . '    return TRUE;') . '  }') . '  public static function getLocalConfiguration() {') . '    $currentLocalConfiguration = array(') . '      \'notChanged\' => 23,') . '      \'toUpdate\' => \'notUpdated\',') . '    );') . '    return $currentLocalConfiguration;') . '  }') . '  public static function writeLocalConfiguration($conf) {') . '    $expectedConfiguration = array(') . '      \'notChanged\' => 23,') . '      \'toUpdate\' => \'updated\',') . '    );') . '    if (!($conf === $expectedConfiguration)) {') . '      throw new Exception(\'broken\');') . '    }') . '    return TRUE;') . '  }') . '}');
-               $className = $namespace . '\\' . $className;
-               $pathToUpdate = 'toUpdate';
-               $valueToUpdate = 'updated';
-               $this->assertTrue($className::setLocalConfigurationValueByPath($pathToUpdate, $valueToUpdate));
-       }
-
-       #######################
-       # Tests concerning setLocalConfigurationValuesByPathValuePairs
-       #######################
-       /**
-        * @test
-        */
-       public function setLocalConfigurationValuesByPathValuePairsSetsPathValuePairs() {
-               $namespace = 'TYPO3\\CMS\\Core\\Configuration';
-               $className = uniqid('ConfigurationManager');
-               eval(((((((((((((((((((((((('namespace ' . $namespace . '; class ' . $className) . ' extends \\TYPO3\\CMS\\Core\\Configuration\\ConfigurationManager {') . '  public static function isValidLocalConfigurationPath() {') . '    return TRUE;') . '  }') . '  public static function getLocalConfiguration() {') . '    $currentLocalConfiguration = array(') . '      \'notChanged\' => 23,') . '      \'toUpdate\' => \'notUpdated\',') . '    );') . '    return $currentLocalConfiguration;') . '  }') . '  public static function writeLocalConfiguration($conf) {') . '    $expectedConfiguration = array(') . '      \'notChanged\' => 23,') . '      \'toUpdate\' => \'updated\',') . '      \'new\' => \'new\',') . '    );') . '    if (!($conf === $expectedConfiguration)) {') . '      throw new Exception(\'broken\');') . '    }') . '    return TRUE;') . '  }') . '}');
-               $className = $namespace . '\\' . $className;
-               $pairs = array(
-                       'toUpdate' => 'updated',
-                       'new' => 'new'
-               );
-               $this->assertTrue($className::setLocalConfigurationValuesByPathValuePairs($pairs));
-       }
-
-       #######################
-       # Tests concerning writeLocalConfiguration
-       #######################
-       /**
-        * @test
-        */
-       public function writeLocalConfigurationWritesSortedContentToConfigurationFile() {
-               $configurationFile = 'typo3temp/' . uniqid('localConfiguration');
-               $namespace = 'TYPO3\\CMS\\Core\\Configuration';
-               $className = uniqid('ConfigurationManager');
-               eval((((((((('namespace ' . $namespace . '; class ' . $className) . ' extends \\TYPO3\\CMS\\Core\\Configuration\\ConfigurationManager {') . '  const LOCAL_CONFIGURATION_FILE = \'') . $configurationFile) . '\';') . '  public static function writeLocalConfiguration($conf) {') . '    return parent::writeLocalConfiguration($conf);') . '  }') . '}');
-               $className = $namespace . '\\' . $className;
-               $this->testFilesToDelete[] = PATH_site . $configurationFile;
-               $pairs = array(
-                       'foo' => 42,
-                       'bar' => 23
-               );
-               $expectedContent = ((((((((((('<?php' . LF) . 'return array(') . LF) . TAB) . '\'bar\' => 23,') . LF) . TAB) . '\'foo\' => 42,') . LF) . ');') . LF) . '?>';
-               $this->assertTrue($className::writeLocalConfiguration($pairs));
-               $this->assertEquals($expectedContent, file_get_contents(PATH_site . $configurationFile));
-       }
-
-       #######################
-       # Tests concerning isValidLocalConfigurationPath
-       #######################
-       /**
-        * @test
-        */
-       public function isValidLocalConfigurationPathAcceptsWhitelistedPath() {
-               $namespace = 'TYPO3\\CMS\\Core\\Configuration';
-               $className = uniqid('ConfigurationManager');
-               eval((((((((('namespace ' . $namespace . '; class ' . $className) . ' extends \\TYPO3\\CMS\\Core\\Configuration\\ConfigurationManager {') . '  protected static $whiteListedLocalConfigurationPaths = array(') . '    \'foo\',') . '  );') . '  public static function isValidLocalConfigurationPath($path) {') . '    return parent::isValidLocalConfigurationPath($path);') . '  }') . '}');
-               $className = $namespace . '\\' . $className;
-               $this->assertTrue($className::isValidLocalConfigurationPath('foo'));
-       }
-
-}
-
-?>
\ No newline at end of file
diff --git a/tests/Unit/t3lib/class.t3lib_autoloaderTest.php b/tests/Unit/t3lib/class.t3lib_autoloaderTest.php
deleted file mode 100644 (file)
index 92b2c4f..0000000
+++ /dev/null
@@ -1,493 +0,0 @@
-<?php
-/***************************************************************
- * Copyright notice
- *
- * (c) 2011 Andreas Wolf <andreas.wolf@ikt-werk.de>
- * All rights reserved
- *
- * This script is part of the TYPO3 project. The TYPO3 project is
- * free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * The GNU General Public License can be found at
- * http://www.gnu.org/copyleft/gpl.html.
- *
- * This script is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * This copyright notice MUST APPEAR in all copies of the script!
- ***************************************************************/
-/**
- * Testcase for the t3lib_autoloader class in the TYPO3 Core.
- *
- * @package TYPO3
- * @subpackage t3lib
- * @author Andreas Wolf <andreas.wolf@ikt-werk.de>
- */
-class t3lib_autoloaderTest extends Tx_Phpunit_TestCase {
-
-       /**
-        * @var boolean Enable backup of global and system variables
-        */
-       protected $backupGlobals = TRUE;
-
-       /**
-        * Exclude TYPO3_DB from backup/ restore of $GLOBALS
-        * because resource types cannot be handled during serializing
-        *
-        * @var array
-        */
-       protected $backupGlobalsBlacklist = array('TYPO3_DB');
-
-       /**
-        * @var array Backup of typo3CacheManager
-        */
-       protected $typo3CacheManager = NULL;
-
-       /**
-        * @var array Register of temporary extensions in typo3temp
-        */
-       protected $fakedExtensions = array();
-
-       /**
-        * Fix a race condition that t3lib_div is not available
-        * during tearDown if fiddling with the autoloader where
-        * backupGlobals is not set up again yet
-        */
-       public function setUp() {
-               $this->typo3CacheManager = $GLOBALS['typo3CacheManager'];
-       }
-
-       /**
-        * Clean up
-        * Warning: Since phpunit itself is php and we are fiddling with php
-        * autoloader code here, the tests are a bit fragile. This tearDown
-        * method ensures that all main classes are available again during
-        * tear down of a testcase.
-        * This construct will fail if the class under test is changed and
-        * not compatible anymore. Make sure to always run the whole test
-        * suite if fiddling with the autoloader unit tests to ensure that
-        * there is no fatal error thrown in other unit test classes triggered
-        * by errors in this one.
-        */
-       public function tearDown() {
-               $GLOBALS['typo3CacheManager'] = $this->typo3CacheManager;
-               \TYPO3\CMS\Core\Autoloader::unregisterAutoloader();
-               \TYPO3\CMS\Core\Autoloader::registerAutoloader();
-               foreach ($this->fakedExtensions as $extension) {
-                       \TYPO3\CMS\Core\Utility\GeneralUtility::rmdir((PATH_site . 'typo3temp/') . $extension, TRUE);
-               }
-       }
-
-       /**
-        * Creates a fake extension inside typo3temp/. No configuration is created,
-        * just the folder, plus the extension is registered in $TYPO3_LOADED_EXT
-        *
-        * @return string The extension key
-        */
-       protected function createFakeExtension() {
-               $extKey = strtolower(uniqid('testing'));
-               $absExtPath = ((PATH_site . 'typo3temp/') . $extKey) . '/';
-               $relPath = ('typo3temp/' . $extKey) . '/';
-               \TYPO3\CMS\Core\Utility\GeneralUtility::mkdir($absExtPath);
-               $GLOBALS['TYPO3_LOADED_EXT'][$extKey] = array(
-                       'siteRelPath' => $relPath
-               );
-               $GLOBALS['TYPO3_CONF_VARS']['EXT']['extListArray'][] = $extKey;
-               $this->fakedExtensions[] = $extKey;
-               \TYPO3\CMS\Core\Extension\ExtensionManager::clearExtensionKeyMap();
-               return $extKey;
-       }
-
-       /**
-        * @test
-        */
-       public function unregisterAndRegisterAgainDoesNotFatal() {
-               \TYPO3\CMS\Core\Autoloader::unregisterAutoloader();
-               \TYPO3\CMS\Core\Autoloader::registerAutoloader();
-               // If this fatals the autoload re registering went wrong
-               \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\TimeTracker\\NullTimeTracker');
-       }
-
-       /**
-        * @test
-        */
-       public function unregisterAutoloaderSetsCacheEntryWithT3libNoTags() {
-               $mockCache = $this->getMock('TYPO3\\CMS\\Core\\Cache\\Frontend\\AbstractFrontend', array('getIdentifier', 'set', 'get', 'getByTag', 'has', 'remove', 'flush', 'flushByTag', 'requireOnce'), array(), '', FALSE);
-               // Expect the mock cache set method to be called
-               // once with t3lib_autoloader as third parameter
-               $mockCache->expects($this->once())->method('set')->with($this->anything(), $this->anything(), array());
-               $GLOBALS['typo3CacheManager'] = $this->getMock('TYPO3\\CMS\\Core\\Cache\\CacheManager', array('getCache'));
-               $GLOBALS['typo3CacheManager']->expects($this->any())->method('getCache')->will($this->returnValue($mockCache));
-               \TYPO3\CMS\Core\Autoloader::unregisterAutoloader();
-       }
-
-       /**
-        * @test
-        */
-       public function autoloadFindsClassFileDefinedInExtAutoloadFile() {
-               $extKey = $this->createFakeExtension();
-               $extPath = ((PATH_site . 'typo3temp/') . $extKey) . '/';
-               $autoloaderFile = $extPath . 'ext_autoload.php';
-               $class = strtolower("tx_{$extKey}_" . uniqid(''));
-               $file = ($extPath . uniqid('')) . '.php';
-               file_put_contents($file, '<?php
-
-throw new \\RuntimeException(\'\', 1310203812);
-
-?>');
-               file_put_contents($autoloaderFile, ((('<?php
-
-return array(\'' . $class) . '\' => \'') . $file) . '\');
-
-?>');
-               // Inject a dummy for the core_phpcode cache to force the autoloader
-               // to re calculate the registry
-               $mockCache = $this->getMock('TYPO3\\CMS\\Core\\Cache\\Frontend\\AbstractFrontend', array('getIdentifier', 'set', 'get', 'getByTag', 'has', 'remove', 'flush', 'flushByTag', 'requireOnce'), array(), '', FALSE);
-               $GLOBALS['typo3CacheManager'] = $this->getMock('TYPO3\\CMS\\Core\\Cache\\CacheManager', array('getCache'));
-               $GLOBALS['typo3CacheManager']->expects($this->any())->method('getCache')->will($this->returnValue($mockCache));
-               // Re-initialize autoloader registry to force it to recognize the new extension
-               \TYPO3\CMS\Core\Autoloader::unregisterAutoloader();
-               \TYPO3\CMS\Core\Autoloader::registerAutoloader();
-               // Expect the exception of the file to be thrown
-               $this->setExpectedException('\\RuntimeException', '', 1310203812);
-               \TYPO3\CMS\Core\Autoloader::autoload($class);
-       }
-
-       /**
-        * @test
-        */
-       public function unregisterAutoloaderWritesLowerCasedClassFileToCache() {
-               $extKey = $this->createFakeExtension();
-               $extPath = ((PATH_site . 'typo3temp/') . $extKey) . '/';
-               $autoloaderFile = $extPath . 'ext_autoload.php';
-               // A case sensitive key (FooBar) in ext_autoload file
-               $class = "tx_{$extKey}_" . uniqid('FooBar');
-               $file = ($extPath . uniqid('')) . '.php';
-               file_put_contents($autoloaderFile, ((('<?php
-
-return array(\'' . $class) . '\' => \'') . $file) . '\');
-
-?>');
-               // Inject a dummy for the core_phpcode cache to force the autoloader
-               // to re calculate the registry
-               $mockCache = $this->getMock('TYPO3\\CMS\\Core\\Cache\\Frontend\\AbstractFrontend', array('getIdentifier', 'set', 'get', 'getByTag', 'has', 'remove', 'flush', 'flushByTag', 'requireOnce'), array(), '', FALSE);
-               $GLOBALS['typo3CacheManager'] = $this->getMock('TYPO3\\CMS\\Core\\Cache\\CacheManager', array('getCache'));
-               $GLOBALS['typo3CacheManager']->expects($this->any())->method('getCache')->will($this->returnValue($mockCache));
-               // Expect that the lower case version of the class name is written to cache
-               $mockCache->expects($this->at(2))->method('set')->with($this->anything(), $this->stringContains(strtolower($class), FALSE));
-               // Re-initialize autoloader registry to force it to recognize the new extension
-               \TYPO3\CMS\Core\Autoloader::unregisterAutoloader();
-               \TYPO3\CMS\Core\Autoloader::registerAutoloader();
-               \TYPO3\CMS\Core\Autoloader::unregisterAutoloader();
-       }
-
-       /**
-        * @test
-        * @expectedException \RuntimeException
-        */
-       public function autoloadFindsClassFileIfExtAutoloadEntryIsCamelCased() {
-               $extKey = $this->createFakeExtension();
-               $extPath = ((PATH_site . 'typo3temp/') . $extKey) . '/';
-               // A case sensitive key (FooBar) in ext_autoload file
-               $class = "tx_{$extKey}_" . uniqid('FooBar');
-               $file = ($extPath . uniqid('')) . '.php';
-               file_put_contents($file, '<?php
-
-throw new \\RuntimeException(\'\', 1336756850);
-
-?>');
-               $extAutoloadFile = $extPath . 'ext_autoload.php';
-               file_put_contents($extAutoloadFile, ((('<?php
-
-return array(\'' . $class) . '\' => \'') . $file) . '\');
-
-?>');
-               // Inject cache and return false, so autoloader is forced to read ext_autoloads from extensions
-               $mockCache = $this->getMock('TYPO3\\CMS\\Core\\Cache\\Frontend\\AbstractFrontend', array('getIdentifier', 'set', 'get', 'getByTag', 'has', 'remove', 'flush', 'flushByTag', 'requireOnce'), array(), '', FALSE);
-               $GLOBALS['typo3CacheManager'] = $this->getMock('TYPO3\\CMS\\Core\\Cache\\CacheManager', array('getCache'));
-               $GLOBALS['typo3CacheManager']->expects($this->any())->method('getCache')->will($this->returnValue($mockCache));
-               $mockCache->expects($this->any())->method('has')->will($this->returnValue(FALSE));
-               // Re-initialize autoloader registry to force it to recognize the new extension
-               \TYPO3\CMS\Core\Autoloader::unregisterAutoloader();
-               \TYPO3\CMS\Core\Autoloader::registerAutoloader();
-               \TYPO3\CMS\Core\Autoloader::autoload($class);
-       }
-
-       /**
-        * @test
-        * @expectedException \RuntimeException
-        */
-       public function autoloadFindsCamelCasedClassFileIfExtAutoloadEntryIsReadLowerCasedFromCache() {
-               $extKey = $this->createFakeExtension();
-               $extPath = ((PATH_site . 'typo3temp/') . $extKey) . '/';
-               // A case sensitive key (FooBar) in ext_autoload file
-               $class = "tx_{$extKey}_" . uniqid('FooBar');
-               $file = ($extPath . uniqid('')) . '.php';
-               file_put_contents($file, '<?php
-
-throw new \RuntimeException(\'\', 1336756850);
-
-?>');
-               // Inject cache mock and let the cache entry return the lowercased class name as key
-               $mockCache = $this->getMock('TYPO3\\CMS\\Core\\Cache\\Frontend\\AbstractFrontend', array('getIdentifier', 'set', 'get', 'getByTag', 'has', 'remove', 'flush', 'flushByTag', 'requireOnce'), array(), '', FALSE);
-               $GLOBALS['typo3CacheManager'] = $this->getMock('TYPO3\\CMS\\Core\\Cache\\CacheManager', array('getCache'));
-               $GLOBALS['typo3CacheManager']->expects($this->any())->method('getCache')->will($this->returnValue($mockCache));
-               $mockCache->expects($this->any())->method('has')->will($this->returnValue(TRUE));
-               $mockCache->expects($this->once())->method('requireOnce')->will($this->returnValue(array(strtolower($class) => $file)));
-               // Re-initialize autoloader registry to force it to recognize the new extension
-               \TYPO3\CMS\Core\Autoloader::unregisterAutoloader();
-               \TYPO3\CMS\Core\Autoloader::registerAutoloader();
-               \TYPO3\CMS\Core\Autoloader::autoload($class);
-       }
-
-       /**
-        * @test
-        */
-       public function autoloadFindsClassFileThatRespectsExtbaseNamingSchemeWithoutExtAutoloadFile() {
-               $this->markTestSkipped('This test was a blocker for other namespaced tests.');
-               $extKey = $this->createFakeExtension();
-               $extPath = ((PATH_site . 'typo3temp/') . $extKey) . '/';
-               // Create a class named Tx_Extension_Foo123_Bar456
-               // to find file extension/Classes/Foo123/Bar456.php
-               $pathSegment = 'Foo' . uniqid();
-               $fileName = 'Bar' . uniqid();
-               $class = (((('Tx_' . $extKey) . '_') . $pathSegment) . '_') . $fileName;
-
-               $file = (((($extPath . 'Classes/') . $pathSegment) . '/') . $fileName) . '.php';
-               \TYPO3\CMS\Core\Utility\GeneralUtility::mkdir_deep(($extPath . 'Classes/') . $pathSegment);
-               file_put_contents($file, '<?php
-
-throw new \\RuntimeException(\'\', 1310203813);
-
-?>');
-               // Inject a dummy for the core_phpcode cache to cache
-               // the calculated cache entry to a dummy cache
-               $mockCache = $this->getMock('TYPO3\\CMS\\Core\\Cache\\Frontend\\AbstractFrontend', array('getIdentifier', 'set', 'get', 'getByTag', 'has', 'remove', 'flush', 'flushByTag', 'requireOnce'), array(), '', FALSE);
-               $GLOBALS['typo3CacheManager'] = $this->getMock('TYPO3\\CMS\\Core\\Cache\\CacheManager', array('getCache'));
-               $GLOBALS['typo3CacheManager']->expects($this->any())->method('getCache')->will($this->returnValue($mockCache));
-               // Expect the exception of the file to be thrown
-               $this->setExpectedException('RuntimeException', '', 1310203813);
-               \TYPO3\CMS\Core\Autoloader::autoload($class);
-       }
-
-       /**
-        * @test
-        */
-       public function unregisterAutoloaderWritesClassFileThatRespectsExtbaseNamingSchemeToCacheFile() {
-               $this->markTestSkipped('This test was a blocker for other namespaced tests.');
-               $extKey = $this->createFakeExtension();
-               $extPath = ((PATH_site . 'typo3temp/') . $extKey) . '/';
-               $pathSegment = 'Foo' . uniqid();
-               $fileName = 'Bar' . uniqid();
-               $class = (((('Tx_' . $extKey) . '_') . $pathSegment) . '_') . $fileName;
-               $file = (((($extPath . 'Classes/') . $pathSegment) . '/') . $fileName) . '.php';
-               \TYPO3\CMS\Core\Utility\GeneralUtility::mkdir_deep(($extPath . 'Classes/') . $pathSegment);
-               file_put_contents($file, '<?php
-
-$foo = \'bar\';
-
-?>');
-               $mockCache = $this->getMock('TYPO3\\CMS\\Core\\Cache\\Frontend\\AbstractFrontend', array('getIdentifier', 'set', 'get', 'getByTag', 'has', 'remove', 'flush', 'flushByTag', 'requireOnce'), array(), '', FALSE);
-               $GLOBALS['typo3CacheManager'] = $this->getMock('TYPO3\\CMS\\Core\\Cache\\CacheManager', array('getCache'));
-               $GLOBALS['typo3CacheManager']->expects($this->any())->method('getCache')->will($this->returnValue($mockCache));
-               // Expect that an entry to the cache is written containing the newly found class
-               $mockCache->expects($this->once())->method('set')->with($this->anything(), $this->stringContains(strtolower($class), $this->anything()));
-               \TYPO3\CMS\Core\Autoloader::autoload($class);
-               \TYPO3\CMS\Core\Autoloader::unregisterAutoloader();
-       }
-
-       /**
-        * @test
-        */
-       public function unregisterAutoloaderWritesClassFileLocationOfClassRespectingExtbaseNamingSchemeToCacheFile() {
-               $this->markTestSkipped('This test was a blocker for other namespaced tests.');
-               $extKey = $this->createFakeExtension();
-               $extPath = ((PATH_site . 'typo3temp/') . $extKey) . '/';
-               $pathSegment = 'Foo' . uniqid();
-               $fileName = 'Bar' . uniqid();
-               $class = (((('Tx_' . $extKey) . '_') . $pathSegment) . '_') . $fileName;
-               $file = (((($extPath . 'Classes/') . $pathSegment) . '/') . $fileName) . '.php';
-               \TYPO3\CMS\Core\Utility\GeneralUtility::mkdir_deep(($extPath . 'Classes/') . $pathSegment);
-               file_put_contents($file, '<?php
-
-$foo = \'bar\';
-
-?>');
-               $mockCache = $this->getMock('TYPO3\\CMS\\Core\\Cache\\Frontend\\AbstractFrontend', array('getIdentifier', 'set', 'get', 'getByTag', 'has', 'remove', 'flush', 'flushByTag', 'requireOnce'), array(), '', FALSE);
-               $GLOBALS['typo3CacheManager'] = $this->getMock('TYPO3\\CMS\\Core\\Cache\\CacheManager', array('getCache'));
-               $GLOBALS['typo3CacheManager']->expects($this->any())->method('getCache')->will($this->returnValue($mockCache));
-               // Expect that an entry to the cache is written containing the newly found class
-               $mockCache->expects($this->once())->method('set')->with($this->anything(), $this->stringContains(strtolower($file), $this->anything()));
-               \TYPO3\CMS\Core\Autoloader::autoload($class);
-               \TYPO3\CMS\Core\Autoloader::unregisterAutoloader();
-       }
-
-       /**
-        * @test
-        */
-       public function getClassPathByRegistryLookupFindsClassPrefixedWithUxRegisteredInExtAutoloadFile() {
-               // Create a dummy extension with a path to a 'ux_' prefixed php file
-               $extKey = $this->createFakeExtension();
-               $extPath = ((PATH_site . 'typo3temp/') . $extKey) . '/';
-               $autoloaderFile = $extPath . 'ext_autoload.php';
-               $class = strtolower("ux_tx_{$extKey}_" . uniqid(''));
-               $file = ($extPath . uniqid('')) . '.php';
-               file_put_contents($autoloaderFile, ((('<?php
-
-return array(\'' . $class) . '\' => \'') . $file) . '\');
-
-?>');
-               // Inject a dummy for the core_phpcode cache to force the autoloader
-               // to re calculate the registry
-               $mockCache = $this->getMock('TYPO3\\CMS\\Core\\Cache\\Frontend\\AbstractFrontend', array('getIdentifier', 'set', 'get', 'getByTag', 'has', 'remove', 'flush', 'flushByTag', 'requireOnce'), array(), '', FALSE);
-               $GLOBALS['typo3CacheManager'] = $this->getMock('TYPO3\\CMS\\Core\\Cache\\CacheManager', array('getCache'));
-               $GLOBALS['typo3CacheManager']->expects($this->any())->method('getCache')->will($this->returnValue($mockCache));
-               // Re-initialize autoloader registry to force it to recognize the new extension with the ux_ autoload definition
-               \TYPO3\CMS\Core\Autoloader::unregisterAutoloader();
-               \TYPO3\CMS\Core\Autoloader::registerAutoloader();
-               $this->assertSame($file, \TYPO3\CMS\Core\Autoloader::getClassPathByRegistryLookup($class));
-       }
-
-       /**
-        * @test
-        */
-       public function unregisterAutoloaderWritesNotExistingUxCLassLookupFromGetClassPathByRegistryLookupToCache() {
-               $uxClassName = 'ux_Tx_Foo' . uniqid();
-               $mockCache = $this->getMock('TYPO3\\CMS\\Core\\Cache\\Frontend\\AbstractFrontend', array('getIdentifier', 'set', 'get', 'getByTag', 'has', 'remove', 'flush', 'flushByTag', 'requireOnce'), array(), '', FALSE);
-               $GLOBALS['typo3CacheManager'] = $this->getMock('TYPO3\\CMS\\Core\\Cache\\CacheManager', array('getCache'));
-               $GLOBALS['typo3CacheManager']->expects($this->any())->method('getCache')->will($this->returnValue($mockCache));
-               \TYPO3\CMS\Core\Autoloader::unregisterAutoloader();
-               \TYPO3\CMS\Core\Autoloader::registerAutoloader();
-               // Class is not found by returning NULL
-               $this->assertSame(NULL, \TYPO3\CMS\Core\Autoloader::getClassPathByRegistryLookup($uxClassName));
-               // Expect NULL lookup is cached
-               $expectedCacheString = ('\'' . strtolower($uxClassName)) . '\' => NULL,';
-               $mockCache->expects($this->once())->method('set')->with($this->anything(), $this->stringContains($expectedCacheString));
-               // Trigger writing new cache file
-               \TYPO3\CMS\Core\Autoloader::unregisterAutoloader();
-       }
-
-       /**
-        * @test
-        */
-       public function unregisterAutoloaderWritesDeprecatedTypo3ConfVarsRegisteredXclassClassFoundByGetClassPathByRegistryLookupToCache() {
-               // Create a fake extension
-               $extKey = $this->createFakeExtension();
-               $extPath = ((PATH_site . 'typo3temp/') . $extKey) . '/';
-               $autoloaderFile = $extPath . 'ext_autoload.php';
-               // Feed ext_autoload with a base file and the class file
-               $class = strtolower("tx_{$extKey}_" . uniqid(''));
-               $fileName = uniqid('') . '.php';
-               $file = $extPath . $fileName;
-               $xClassFile = ('typo3temp/' . $extKey) . '/xclassFile';
-               file_put_contents($autoloaderFile, ((('<?php
-
-return array(\'' . $class) . '\' => \'') . $file) . '\');
-
-?>');
-               file_put_contents(PATH_site . $xClassFile, '<?php
-
-die();
-
-?>');
-               // Register a xclass for the base file
-               $GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS'][(('typo3temp/' . $extKey) . '/') . $fileName] = $xClassFile;
-               // Inject a dummy for the core_phpcode cache to force the autoloader
-               // to re calculate the registry
-               $mockCache = $this->getMock('TYPO3\\CMS\\Core\\Cache\\Frontend\\AbstractFrontend', array('getIdentifier', 'set', 'get', 'getByTag', 'has', 'remove', 'flush', 'flushByTag', 'requireOnce'), array(), '', FALSE);
-               $GLOBALS['typo3CacheManager'] = $this->getMock('TYPO3\\CMS\\Core\\Cache\\CacheManager', array('getCache'));
-               $GLOBALS['typo3CacheManager']->expects($this->any())->method('getCache')->will($this->returnValue($mockCache));
-               // Excpect the cache entry to be called once with the new class name
-               $mockCache->expects($this->at(2))->method('set')->with($this->anything(), $this->stringContains('ux_' . $class));
-               \TYPO3\CMS\Core\Autoloader::unregisterAutoloader();
-               \TYPO3\CMS\Core\Autoloader::registerAutoloader();
-               \TYPO3\CMS\Core\Autoloader::getClassPathByRegistryLookup('ux_' . $class);
-               \TYPO3\CMS\Core\Autoloader::unregisterAutoloader();
-       }
-
-       /**
-        * @test
-        */
-       public function autoloadFindsClassFileThatRespectsExtbaseNamingSchemeWithNamespace() {
-               $this->markTestSkipped('This test was a blocker for other namespaced tests.');
-               $extKey = $this->createFakeExtension();
-               $extPath = ((PATH_site . 'typo3temp/') . $extKey) . '/';
-               // Create a class named \Tx\Extension\Foo123\Bar456
-               // to find file extension/Classes/Foo123/Bar456.php
-               $pathSegment = 'Foo' . uniqid();
-               $fileName = 'Bar' . uniqid();
-               $namespacedClass = (((('\\Vendor\\' . $extKey) . '\\') . $pathSegment) . '\\') . $fileName;
-               $file = (((($extPath . 'Classes/') . $pathSegment) . '/') . $fileName) . '.php';
-               \TYPO3\CMS\Core\Utility\GeneralUtility::mkdir_deep(($extPath . 'Classes/') . $pathSegment);
-               file_put_contents($file, ((('<?php' . LF) . 'throw new RuntimeException(\'\', 1342800577);') . LF) . '?>');
-               // Re-initialize autoloader registry to force it to recognize the new extension
-               \TYPO3\CMS\Core\Autoloader::unregisterAutoloader();
-               \TYPO3\CMS\Core\Autoloader::registerAutoloader();
-               // Expect the exception of the file to be thrown
-               $this->setExpectedException('\\RuntimeException', '', 1342800577);
-               \TYPO3\CMS\Core\Autoloader::autoload($namespacedClass);
-       }
-
-       /**
-        * @test
-        */
-       public function unregisterAutoloaderWritesClassFileLocationOfClassRespectingExtbaseNamingSchemeWithNamespaceToCacheFile() {
-               $this->markTestSkipped('This test was a blocker for other namespaced tests.');
-               $extKey = $this->createFakeExtension();
-               $extPath = ((PATH_site . 'typo3temp/') . $extKey) . '/';
-               $pathSegment = 'Foo' . uniqid();
-               $fileName = 'Bar' . uniqid();
-               $namespacedClass = (((('\\Tx\\' . $extKey) . '\\') . $pathSegment) . '\\') . $fileName;
-               $file = (((($extPath . 'Classes/') . $pathSegment) . '/') . $fileName) . '.php';
-               \TYPO3\CMS\Core\Utility\GeneralUtility::mkdir_deep(($extPath . 'Classes/') . $pathSegment);
-               file_put_contents($file, ('<?php' . LF) . ($foo = ('bar;' . LF) . '?>'));
-               $mockCache = $this->getMock('TYPO3\\CMS\\Core\\Cache\\Frontend\\AbstractFrontend', array('getIdentifier', 'set', 'get', 'getByTag', 'has', 'remove', 'flush', 'flushByTag', 'requireOnce'), array(), '', FALSE);
-               $GLOBALS['typo3CacheManager'] = $this->getMock('TYPO3\\CMS\\Core\\Cache\\CacheManager', array('getCache'));
-               $GLOBALS['typo3CacheManager']->expects($this->any())->method('getCache')->will($this->returnValue($mockCache));
-               // Expect that an entry to the cache is written containing the newly found class
-               $mockCache->expects($this->once())->method('set')->with($this->anything(), $this->stringContains(strtolower($file), $this->anything()));
-               \TYPO3\CMS\Core\Autoloader::autoload($namespacedClass);
-               \TYPO3\CMS\Core\Autoloader::unregisterAutoloader();
-       }
-
-       /**
-        * @test
-        */
-       public function checkClassNamesNotExtbaseSchemePassAutoloaderUntouched() {
-               $class = '\\Symfony\\Foo\\Bar';
-               $this->assertNull(\TYPO3\CMS\Core\Autoloader::getClassPathByRegistryLookup($class));
-       }
-
-       /**
-        * @test
-        */
-       public function checkAutoloaderSetsNamespacedClassnamesInExtAutoloadAreWrittenToCache() {
-               $extKey = $this->createFakeExtension();
-               $extPath = ((PATH_site . 'typo3temp/') . $extKey) . '/';
-               $pathSegment = 'Foo' . uniqid();
-               $fileName = 'Bar' . uniqid();
-               $autoloaderFile = $extPath . 'ext_autoload.php';
-               // A case sensitive key (FooBar) in ext_autoload file
-               $namespacedClass = (((('\\Tx\\' . $extKey) . '\\') . $pathSegment) . '\\') . $fileName;
-               file_put_contents($autoloaderFile, ((((('<?php' . LF) . 'return array(\'') . $namespacedClass) . '\' =>   \'EXT:someExt/Classes/Foo/bar.php\');') . LF) . '?>');
-               // Inject a dummy for the core_phpcode cache to force the autoloader
-               // to re calculate the registry
-               $mockCache = $this->getMock('TYPO3\\CMS\\Core\\Cache\\Frontend\\AbstractFrontend', array('getIdentifier', 'set', 'get', 'getByTag', 'has', 'remove', 'flush', 'flushByTag', 'requireOnce'), array(), '', FALSE);
-               $GLOBALS['typo3CacheManager'] = $this->getMock('TYPO3\\CMS\\Core\\Cache\\CacheManager', array('getCache'));
-               $GLOBALS['typo3CacheManager']->expects($this->any())->method('getCache')->will($this->returnValue($mockCache));
-               // Expect that the lower case version of the class name is written to cache
-               $mockCache->expects($this->at(2))->method('set')->with($this->anything(), $this->stringContains(strtolower($namespacedClass), FALSE));
-               // Re-initialize autoloader registry to force it to recognize the new extension
-               \TYPO3\CMS\Core\Autoloader::unregisterAutoloader();
-               \TYPO3\CMS\Core\Autoloader::registerAutoloader();
-               \TYPO3\CMS\Core\Autoloader::unregisterAutoloader();
-       }
-
-}
-
-?>
\ No newline at end of file
diff --git a/tests/Unit/t3lib/class.t3lib_befuncTest.php b/tests/Unit/t3lib/class.t3lib_befuncTest.php
deleted file mode 100644 (file)
index 1f7831c..0000000
+++ /dev/null
@@ -1,330 +0,0 @@
-<?php
-/***************************************************************
- * Copyright notice
- *
- * (c) 2009-2011 Oliver Klee (typo3-coding@oliverklee.de)
- * All rights reserved
- *
- * This script is part of the TYPO3 project. The TYPO3 project is
- * free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * The GNU General Public License can be found at
- * http://www.gnu.org/copyleft/gpl.html.
- *
- * This script is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * This copyright notice MUST APPEAR in all copies of the script!
- ***************************************************************/
-/**
- * Testcase for the t3lib_BEfunc class in the TYPO3 core.
- *
- * @package TYPO3
- * @subpackage t3lib
- * @author Oliver Klee <typo3-coding@oliverklee.de>
- */
-class t3lib_befuncTest extends tx_phpunit_testcase {
-
-       /**
-        * @var \TYPO3\CMS\Backend\Utility\BackendUtility
-        */
-       private $fixture;
-
-       public function setUp() {
-               $this->fixture = new \TYPO3\CMS\Backend\Utility\BackendUtility();
-       }
-
-       public function tearDown() {
-               unset($this->fixture);
-       }
-
-       ///////////////////////////////////////
-       // Tests concerning getProcessedValue
-       ///////////////////////////////////////
-       /**
-        * @test
-        * @see http://bugs.typo3.org/view.php?id=11875
-        */
-       public function getProcessedValueForZeroStringIsZero() {
-               $this->assertEquals('0', $this->fixture->getProcessedValue('tt_content', 'header', '0'));
-       }
-
-       ////////////////////////////////////////////
-       // Tests concerning getCommenSelectFields
-       ////////////////////////////////////////////
-       /**
-        * Data provider for getCommonSelectFieldsReturnsCorrectFields
-        *
-        * @return array The test data with $table, $prefix, $presetFields, $tca, $expectedFields
-        */
-       public function getCommonSelectFieldsReturnsCorrectFieldsDataProvider() {
-               return array(
-                       'only uid' => array(
-                               'table' => 'test_table',
-                               'prefix' => '',
-                               'presetFields' => array(),
-                               'tca' => array(),
-                               'expectedFields' => 'uid'
-                       ),
-                       'label set' => array(
-                               'table' => 'test_table',
-                               'prefix' => '',
-                               'presetFields' => array(),
-                               'tca' => array(
-                                       'ctrl' => array(
-                                               'label' => 'label'
-                                       )
-                               ),
-                               'expectedFields' => 'uid,label'
-                       ),
-                       'label_alt set' => array(
-                               'table' => 'test_table',
-                               'prefix' => '',
-                               'presetFields' => array(),
-                               'tca' => array(
-                                       'ctrl' => array(
-                                               'label_alt' => 'label,label2'
-                                       )
-                               ),
-                               'expectedFields' => 'uid,label,label2'
-                       ),
-                       'versioningWS set' => array(
-                               'table' => 'test_table',
-                               'prefix' => '',
-                               'presetFields' => array(),
-                               'tca' => array(
-                                       'ctrl' => array(
-                                               'versioningWS' => '2'
-                                       )
-                               ),
-                               'expectedFields' => 'uid,t3ver_id,t3ver_state,t3ver_wsid,t3ver_count'
-                       ),
-                       'selicon_field set' => array(
-                               'table' => 'test_table',
-                               'prefix' => '',
-                               'presetFields' => array(),
-                               'tca' => array(
-                                       'ctrl' => array(
-                                               'selicon_field' => 'field'
-                                       )
-                               ),
-                               'expectedFields' => 'uid,field'
-                       ),
-                       'typeicon_column set' => array(
-                               'table' => 'test_table',
-                               'prefix' => '',
-                               'presetFields' => array(),
-                               'tca' => array(
-                                       'ctrl' => array(
-                                               'typeicon_column' => 'field'
-                                       )
-                               ),
-                               'expectedFields' => 'uid,field'
-                       ),
-                       'enablecolumns set' => array(
-                               'table' => 'test_table',
-                               'prefix' => '',
-                               'presetFields' => array(),
-                               'tca' => array(
-                                       'ctrl' => array(
-                                               'enablecolumns' => array(
-                                                       'disabled' => 'hidden',
-                                                       'starttime' => 'start',
-                                                       'endtime' => 'stop',
-                                                       'fe_group' => 'groups'
-                                               )
-                                       )
-                               ),
-                               'expectedFields' => 'uid,hidden,start,stop,groups'
-                       ),
-                       'label set to uid' => array(
-                               'table' => 'test_table',
-                               'prefix' => '',
-                               'presetFields' => array(),
-                               'tca' => array(
-                                       'ctrl' => array(
-                                               'label' => 'uid'
-                                       )
-                               ),
-                               'expectedFields' => 'uid'
-                       )
-               );
-       }
-
-       /**
-        * @test
-        * @dataProvider getCommonSelectFieldsReturnsCorrectFieldsDataProvider
-        */
-       public function getCommonSelectFieldsReturnsCorrectFields($table, $prefix = '', array $presetFields, array $tca, $expectedFields = '') {
-               \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($table);
-               $tcaBackup = $GLOBALS['TCA'][$table];
-               unset($GLOBALS['TCA'][$table]);
-               $GLOBALS['TCA'][$table] = $tca;
-               $selectFields = $this->fixture->getCommonSelectFields($table, $prefix, $presetFields);
-               unset($GLOBALS['TCA'][$table]);
-               $GLOBALS['TCA'][$table] = $tcaBackup;
-               $this->assertEquals($selectFields, $expectedFields);
-       }
-
-       ////////////////////////////////////////////
-       // Tests concerning getLabelFromItemlist
-       ////////////////////////////////////////////
-       /**
-        * Data provider for getLabelFromItemlistReturnsCorrectFields
-        *
-        * @return array The test data with $table, $col, $key, $expectedLabel
-        */
-       public function getLabelFromItemlistReturnsCorrectFieldsDataProvider() {
-               return array(
-                       'item set' => array(
-                               'table' => 'tt_content',
-                               'col' => 'menu_type',
-                               'key' => '1',
-                               'tca' => array(
-                                       'columns' => array(
-                                               'menu_type' => array(
-                                                       'config' => array(
-                                                               'items' => array(
-                                                                       array('Item 1', '0'),
-                                                                       array('Item 2', '1'),
-                                                                       array('Item 3', '3')
-                                                               )
-                                                       )
-                                               )
-                                       )
-                               ),
-                               'expectedLabel' => 'Item 2'
-                       ),
-                       'item set twice' => array(
-                               'table' => 'tt_content',
-                               'col' => 'menu_type',
-                               'key' => '1',
-                               'tca' => array(
-                                       'columns' => array(
-                                               'menu_type' => array(
-                                                       'config' => array(
-                                                               'items' => array(
-                                                                       array('Item 1', '0'),
-                                                                       array('Item 2a', '1'),
-                                                                       array('Item 2b', '1'),
-                                                                       array('Item 3', '3')
-                                                               )
-                                                       )
-                                               )
-                                       )
-                               ),
-                               'expectedLabel' => 'Item 2a'
-                       ),
-                       'item not found' => array(
-                               'table' => 'tt_content',
-                               'col' => 'menu_type',
-                               'key' => '5',
-                               'tca' => array(
-                                       'columns' => array(
-                                               'menu_type' => array(
-                                                       'config' => array(
-                                                               'items' => array(
-                                                                       array('Item 1', '0'),
-                                                                       array('Item 2', '1'),
-                                                                       array('Item 3', '2')
-                                                               )
-                                                       )
-                                               )
-                                       )
-                               ),
-                               'expectedLabel' => NULL
-                       )
-               );
-       }
-
-       /**
-        * @test
-        * @dataProvider getLabelFromItemlistReturnsCorrectFieldsDataProvider
-        */
-       public function getLabelFromItemlistReturnsCorrectFields($table, $col = '', $key = '', array $tca, $expectedLabel = '') {
-               \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($table);
-               $tcaBackup = $GLOBALS['TCA'][$table];
-               unset($GLOBALS['TCA'][$table]);
-               $GLOBALS['TCA'][$table] = $tca;
-               $label = $this->fixture->getLabelFromItemlist($table, $col, $key);
-               unset($GLOBALS['TCA'][$table]);
-               $GLOBALS['TCA'][$table] = $tcaBackup;
-               $this->assertEquals($label, $expectedLabel);
-       }
-
-       ////////////////////////////////////////////
-       // Tests concerning getLabelFromItemListMerged
-       ////////////////////////////////////////////
-       /**
-        * Data provider for getLabelFromItemListMerged
-        *
-        * @return array The test data with $pageId, $table, $column, $key, $expectedLabel
-        */
-       public function getLabelFromItemListMergedReturnsCorrectFieldsDataProvider() {
-               return array(
-                       'no field found' => array(
-                               'pageId' => '123',
-                               'table' => 'tt_content',
-                               'col' => 'menu_type',
-                               'key' => '10',
-                               'tca' => array(
-                                       'columns' => array(
-                                               'menu_type' => array(
-                                                       'config' => array(
-                                                               'items' => array(
-                                                                       array('Item 1', '0'),
-                                                                       array('Item 2', '1'),
-                                                                       array('Item 3', '3')
-                                                               )
-                                                       )
-                                               )
-                                       )
-                               ),
-                               'expectedLabel' => ''
-                       ),
-                       'no tsconfig set' => array(
-                               'pageId' => '123',
-                               'table' => 'tt_content',
-                               'col' => 'menu_type',
-                               'key' => '1',
-                               'tca' => array(
-                                       'columns' => array(
-                                               'menu_type' => array(
-                                                       'config' => array(
-                                                               'items' => array(
-                                                                       array('Item 1', '0'),
-                                                                       array('Item 2', '1'),
-                                                                       array('Item 3', '3')
-                                                               )
-                                                       )
-                                               )
-                                       )
-                               ),
-                               'expectedLabel' => 'Item 2'
-                       )
-               );
-       }
-
-       /**
-        * @test
-        * @dataProvider getLabelFromItemListMergedReturnsCorrectFieldsDataProvider
-        */
-       public function getLabelFromItemListMergedReturnsCorrectFields($pageId, $table, $column = '', $key = '', array $tca, $expectedLabel = '') {
-               \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($table);
-               $tcaBackup = $GLOBALS['TCA'][$table];
-               unset($GLOBALS['TCA'][$table]);
-               $GLOBALS['TCA'][$table] = $tca;
-               $label = $this->fixture->getLabelFromItemListMerged($pageId, $table, $column, $key);
-               unset($GLOBALS['TCA'][$table]);
-               $GLOBALS['TCA'][$table] = $tcaBackup;
-               $this->assertEquals($label, $expectedLabel);
-       }
-
-}
-
-?>
\ No newline at end of file
diff --git a/tests/Unit/t3lib/class.t3lib_beuserauthTest.php b/tests/Unit/t3lib/class.t3lib_beuserauthTest.php
deleted file mode 100644 (file)
index b9c28d7..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-<?php
-/***************************************************************
- * Copyright notice
- *
- * (c) 2010-2011 Oliver Klee (typo3-coding@oliverklee.de)
- * All rights reserved
- *
- * This script is part of the TYPO3 project. The TYPO3 project is
- * free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * The GNU General Public License can be found at
- * http://www.gnu.org/copyleft/gpl.html.
- *
- * This script is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * This copyright notice MUST APPEAR in all copies of the script!
- ***************************************************************/
-/**
- * Testcase for the t3lib_beUserAuth class in the TYPO3 Core extension.
- *
- * @package TYPO3
- * @subpackage t3lib
- * @author Oliver Klee <typo3-coding@oliverklee.de>
- */
-class t3lib_beUserAuthTest extends tx_phpunit_testcase {
-
-       /**
-        * @var \TYPO3\CMS\Core\Authentication\BackendUserAuthentication
-        */
-       private $fixture = NULL;
-
-       /**
-        * Enable backup of global and system variables
-        *
-        * @var boolean
-        */
-       protected $backupGlobals = TRUE;
-
-       /**
-        * Exclude TYPO3_DB from backup/ restore of $GLOBALS
-        * because resource types cannot be handled during serializing
-        *
-        * @var array
-        */
-       protected $backupGlobalsBlacklist = array('TYPO3_DB');
-
-       public function setUp() {
-               // reset hooks
-               $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'] = array();
-               $this->fixture = new \TYPO3\CMS\Core\Authentication\BackendUserAuthentication();
-       }
-
-       public function tearDown() {
-               unset($this->fixture);
-               \TYPO3\CMS\Core\FormProtection\FormProtectionFactory::purgeInstances();
-       }
-
-       /////////////////////////////////////////
-       // Tests concerning the form protection
-       /////////////////////////////////////////
-       /**
-        * @test
-        */
-       public function logoffCleansFormProtection() {
-               $formProtection = $this->getMock('TYPO3\\CMS\\Core\\FormProtection\\BackendFormProtection', array('clean'));
-               $formProtection->expects($this->atLeastOnce())->method('clean');
-               \TYPO3\CMS\Core\FormProtection\FormProtectionFactory::set('TYPO3\\CMS\\Core\\FormProtection\\BackendFormProtection', $formProtection);
-               $this->fixture->logoff();
-       }
-
-}
-
-?>
\ No newline at end of file
diff --git a/tests/Unit/t3lib/class.t3lib_csTest.php b/tests/Unit/t3lib/class.t3lib_csTest.php
deleted file mode 100644 (file)
index abdcec9..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-<?php
-/***************************************************************
- * Copyright notice
- *
- * (c) 2010-2011 Oliver Klee (typo3-coding@oliverklee.de)
- * All rights reserved
- *
- * This script is part of the TYPO3 project. The TYPO3 project is
- * free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * The GNU General Public License can be found at
- * http://www.gnu.org/copyleft/gpl.html.
- *
- * This script is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * This copyright notice MUST APPEAR in all copies of the script!
- ***************************************************************/
-/**
- * Testcase for the t3lib_cs class in the TYPO3 Core.
- *
- * @package TYPO3
- * @subpackage t3lib
- * @author Oliver Klee <typo3-coding@oliverklee.de>
- */
-class t3lib_csTest extends tx_phpunit_testcase {
-
-       /**
-        * @var \TYPO3\CMS\Core\Charset\CharsetConverter
-        */
-       private $fixture = NULL;
-
-       public function setUp() {
-               $this->fixture = new \TYPO3\CMS\Core\Charset\CharsetConverter();
-       }
-
-       public function tearDown() {
-               unset($this->fixture);
-       }
-
-       ////////////////////////////
-       // Tests concerning substr
-       ////////////////////////////
-       /**
-        * @test
-        * @see http://bugs.typo3.org/view.php?id=13934
-        */
-       public function substrForEmptyStringAndNonZeroLengthReturnsEmptyString() {
-               $this->assertSame('', $this->fixture->substr('utf-8', '', 0, 42));
-       }
-
-       /////////////////////////////////
-       // Tests concerning utf8_strlen
-       /////////////////////////////////
-       /**
-        * @test
-        */
-       public function utf8_strlenForNonEmptyAsciiOnlyStringReturnsNumberOfCharacters() {
-               $this->assertEquals(10, $this->fixture->utf8_strlen('good omens'));
-       }
-
-}
-
-?>
\ No newline at end of file
diff --git a/tests/Unit/t3lib/class.t3lib_dbTest.php b/tests/Unit/t3lib/class.t3lib_dbTest.php
deleted file mode 100644 (file)
index 75eb8a5..0000000
+++ /dev/null
@@ -1,108 +0,0 @@
-<?php
-/***************************************************************
- * Copyright notice
- *
- * (c) 2010-2011 Ernesto Baschny (ernst@cron-it.de)
- * All rights reserved
- *
- * This script is part of the TYPO3 project. The TYPO3 project is
- * free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * The GNU General Public License can be found at
- * http://www.gnu.org/copyleft/gpl.html.
- *
- * This script is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * This copyright notice MUST APPEAR in all copies of the script!
- ***************************************************************/
-/**
- * Testcase for the t3lib_db class in the TYPO3 Core.
- *
- * @package TYPO3
- * @subpackage t3lib
- * @author Ernesto Baschny <ernst@cron-it.de>
- */
-class t3lib_dbTest extends tx_phpunit_testcase {
-
-       /**
-        * @var t3lib_db
-        */
-       private $fixture = NULL;
-
-       private $testTable;
-
-       public function setUp() {
-               $this->fixture = $GLOBALS['TYPO3_DB'];
-               $this->testTable = 'test_t3lib_dbtest';
-               $this->fixture->sql_query(('CREATE TABLE ' . $this->testTable) . ' (
-                       id int(11) unsigned NOT NULL auto_increment,
-                       fieldblob mediumblob,
-                       PRIMARY KEY (id)
-               ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-               ');
-       }
-
-       public function tearDown() {
-               $this->fixture->sql_query(('DROP TABLE ' . $this->testTable) . ';');
-               unset($this->fixture);
-       }
-
-       //////////////////////////////////////////////////
-       // Write/Read tests for charsets and binaries
-       //////////////////////////////////////////////////
-       /**
-        * @test
-        */
-       public function storedFullAsciiRangeReturnsSameData() {
-               $binaryString = '';
-               for ($i = 0; $i < 256; $i++) {
-                       $binaryString .= chr($i);
-               }
-               $this->fixture->exec_INSERTquery($this->testTable, array('fieldblob' => $binaryString));
-               $id = $this->fixture->sql_insert_id();
-               $entry = $this->fixture->exec_SELECTgetRows('fieldblob', $this->testTable, 'id = ' . $id);
-               $this->assertEquals($binaryString, $entry[0]['fieldblob']);
-       }
-
-       /**
-        * @test
-        */
-       public function storedGzipCompressedDataReturnsSameData() {
-               $testStringWithBinary = @gzcompress('sdfkljer4587');
-               $this->fixture->exec_INSERTquery($this->testTable, array('fieldblob' => $testStringWithBinary));
-               $id = $this->fixture->sql_insert_id();
-               $entry = $this->fixture->exec_SELECTgetRows('fieldblob', $this->testTable, 'id = ' . $id);
-               $this->assertEquals($testStringWithBinary, $entry[0]['fieldblob']);
-       }
-
-       ////////////////////////////////
-       // Tests concerning listQuery
-       ////////////////////////////////
-       /**
-        * @test
-        * @see http://bugs.typo3.org/view.php?id=15211
-        */
-       public function listQueryWithIntegerCommaAsValue() {
-               // Note: 44 = ord(',')
-               $this->assertEquals($this->fixture->listQuery('dummy', 44, 'table'), $this->fixture->listQuery('dummy', '44', 'table'));
-       }
-
-       /////////////////////////////////////////////////
-       // Tests concerning escapeStringForLikeComparison
-       /////////////////////////////////////////////////
-       /**
-        * @test
-        */
-       public function escapeStringForLikeComparison() {
-               $this->assertEquals('foo\\_bar\\%', $this->fixture->escapeStrForLike('foo_bar%', 'table'));
-       }
-
-}
-
-?>
\ No newline at end of file
diff --git a/tests/Unit/t3lib/class.t3lib_divTest.php b/tests/Unit/t3lib/class.t3lib_divTest.php
deleted file mode 100644 (file)
index d28c544..0000000
+++ /dev/null
@@ -1,3934 +0,0 @@
-<?php
-/***************************************************************
- *  Copyright notice
- *
- *  (c) 2009-2011 Ingo Renner <ingo@typo3.org>
- *  All rights reserved
- *
- *  This script is part of the TYPO3 project. The TYPO3 project is
- *  free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  The GNU General Public License can be found at
- *  http://www.gnu.org/copyleft/gpl.html.
- *
- *  This script is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  This copyright notice MUST APPEAR in all copies of the script!
- ***************************************************************/
-/**
- * Testcase for class t3lib_div
- *
- * @author Ingo Renner <ingo@typo3.org>
- * @author Oliver Klee <typo3-coding@oliverklee.de>
- * @package TYPO3
- * @subpackage t3lib
- */
-class t3lib_divTest extends tx_phpunit_testcase {
-
-       /**
-        * Enable backup of global and system variables
-        *
-        * @var boolean
-        */
-       protected $backupGlobals = TRUE;
-
-       /**
-        * Exclude TYPO3_DB from backup/ restore of $GLOBALS
-        * because resource types cannot be handled during serializing
-        *
-        * @var array
-        */
-       protected $backupGlobalsBlacklist = array('TYPO3_DB');
-
-       public function tearDown() {
-               \TYPO3\CMS\Core\Utility\GeneralUtility::purgeInstances();
-       }
-
-       ///////////////////////////
-       // Tests concerning _GP
-       ///////////////////////////
-       /**
-        * @test
-        * @dataProvider gpDataProvider
-        */
-       public function canRetrieveValueWithGP($key, $get, $post, $expected) {
-               $_GET = $get;
-               $_POST = $post;
-               $this->assertSame($expected, \TYPO3\CMS\Core\Utility\GeneralUtility::_GP($key));
-       }
-
-       /**
-        * Data provider for canRetrieveValueWithGP.
-        * All test values also check whether slashes are stripped properly.
-        *
-        * @return array
-        */
-       public function gpDataProvider() {
-               return array(
-                       'No key parameter' => array(NULL, array(), array(), NULL),
-                       'Key not found' => array('cake', array(), array(), NULL),
-                       'Value only in GET' => array('cake', array('cake' => 'li\\e'), array(), 'lie'),
-                       'Value only in POST' => array('cake', array(), array('cake' => 'l\\ie'), 'lie'),
-                       'Value from POST preferred over GET' => array('cake', array('cake' => 'is a'), array('cake' => '\\lie'), 'lie'),
-                       'Value can be an array' => array(
-                               'cake',
-                               array('cake' => array('is a' => 'l\\ie')),
-                               array(),
-                               array('is a' => 'lie')
-                       )
-               );
-       }
-
-       ///////////////////////////
-       // Tests concerning _GPmerged
-       ///////////////////////////
-       /**
-        * @test
-        * @dataProvider gpMergedDataProvider
-        */
-       public function gpMergedWillMergeArraysFromGetAndPost($get, $post, $expected) {
-               $_POST = $post;
-               $_GET = $get;
-               $this->assertEquals($expected, \TYPO3\CMS\Core\Utility\GeneralUtility::_GPmerged('cake'));
-       }
-
-       /**
-        * Data provider for gpMergedWillMergeArraysFromGetAndPost
-        *
-        * @return array
-        */
-       public function gpMergedDataProvider() {
-               $fullDataArray = array('cake' => array('a' => 'is a', 'b' => 'lie'));
-               $postPartData = array('cake' => array('b' => 'lie'));
-               $getPartData = array('cake' => array('a' => 'is a'));
-               $getPartDataModified = array('cake' => array('a' => 'is not a'));
-               return array(
-                       'Key doesn\' exist' => array(array('foo'), array('bar'), array()),
-                       'No POST data' => array($fullDataArray, array(), $fullDataArray['cake']),
-                       'No GET data' => array(array(), $fullDataArray, $fullDataArray['cake']),
-                       'POST and GET are merged' => array($getPartData, $postPartData, $fullDataArray['cake']),
-                       'POST is preferred over GET' => array($getPartDataModified, $fullDataArray, $fullDataArray['cake'])
-               );
-       }
-
-       ///////////////////////////////
-       // Tests concerning _GET / _POST
-       ///////////////////////////////
-       /**
-        * Data provider for canRetrieveGlobalInputsThroughGet
-        * and canRetrieveGlobalInputsThroughPost
-        *
-        * @return array
-        */
-       public function getAndPostDataProvider() {
-               return array(
-                       'Requested input data doesn\'t exist' => array('cake', array(), NULL),
-                       'No key will return entire input data' => array(NULL, array('cake' => 'l\\ie'), array('cake' => 'lie')),
-                       'Can retrieve specific input' => array('cake', array('cake' => 'li\\e', 'foo'), 'lie'),
-                       'Can retrieve nested input data' => array('cake', array('cake' => array('is a' => 'l\\ie')), array('is a' => 'lie'))
-               );
-       }
-
-       /**
-        * @test
-        * @dataProvider getAndPostDataProvider
-        */
-       public function canRetrieveGlobalInputsThroughGet($key, $get, $expected) {
-               $_GET = $get;
-               $this->assertSame($expected, \TYPO3\CMS\Core\Utility\GeneralUtility::_GET($key));
-       }
-
-       /**
-        * @test
-        * @dataProvider getAndPostDataProvider
-        */
-       public function canRetrieveGlobalInputsThroughPost($key, $post, $expected) {
-               $_POST = $post;
-               $this->assertSame($expected, \TYPO3\CMS\Core\Utility\GeneralUtility::_POST($key));
-       }
-
-       ///////////////////////////////
-       // Tests concerning _GETset
-       ///////////////////////////////
-       /**
-        * @test
-        * @dataProvider getSetDataProvider
-        */
-       public function canSetNewGetInputValues($input, $key, $expected, $getPreset = array()) {
-               $_GET = $getPreset;
-               \TYPO3\CMS\Core\Utility\GeneralUtility::_GETset($input, $key);
-               $this->assertSame($expected, $_GET);
-       }
-
-       /**
-        * Data provider for canSetNewGetInputValues
-        *
-        * @return array
-        */
-       public function getSetDataProvider() {
-               return array(
-                       'No input data used without target key' => array(NULL, NULL, array()),
-                       'No input data used with target key' => array(NULL, 'cake', array('cake' => '')),
-                       'No target key used with string input data' => array('data', NULL, array()),
-                       'No target key used with array input data' => array(array('cake' => 'lie'), NULL, array('cake' => 'lie')),
-                       'Target key and string input data' => array('lie', 'cake', array('cake' => 'lie')),
-                       'Replace existing GET data' => array('lie', 'cake', array('cake' => 'lie'), array('cake' => 'is a lie')),
-                       'Target key pointing to sublevels and string input data' => array('lie', 'cake|is', array('cake' => array('is' => 'lie'))),
-                       'Target key pointing to sublevels and array input data' => array(array('a' => 'lie'), 'cake|is', array('cake' => array('is' => array('a' => 'lie'))))
-               );
-       }
-
-       ///////////////////////////////
-       // Tests concerning gif_compress
-       ///////////////////////////////
-       /**
-        * @test
-        */
-       public function gifCompressFixesPermissionOfConvertedFileIfUsingImagemagick() {
-               if (TYPO3_OS == 'WIN') {
-                       $this->markTestSkipped('gifCompressFixesPermissionOfConvertedFileIfUsingImagemagick() test not available on Windows.');
-               }
-               if (!$GLOBALS['TYPO3_CONF_VARS']['GFX']['im'] || !$GLOBALS['TYPO3_CONF_VARS']['GFX']['im_path_lzw']) {
-                       $this->markTestSkipped('gifCompressFixesPermissionOfConvertedFileIfUsingImagemagick() test not available without imagemagick setup.');
-               }
-               $testFinder = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('Tx_Phpunit_Service_TestFinder');
-               $fixtureGifFile = $testFinder->getAbsoluteCoreTestsPath() . 'Unit/t3lib/fixtures/clear.gif';
-               $GLOBALS['TYPO3_CONF_VARS']['GFX']['gif_compress'] = TRUE;
-               // Copy file to unique filename in typo3temp, set target permissions and run method
-               $testFilename = ((PATH_site . 'typo3temp/') . uniqid('test_')) . '.gif';
-               @copy($fixtureGifFile, $testFilename);
-               $GLOBALS['TYPO3_CONF_VARS']['BE']['fileCreateMask'] = '0777';
-               \TYPO3\CMS\Core\Utility\GeneralUtility::gif_compress($testFilename, 'IM');
-               // Get actual permissions and clean up
-               clearstatcache();
-               $resultFilePermissions = substr(decoct(fileperms($testFilename)), 2);
-               \TYPO3\CMS\Core\Utility\GeneralUtility::unlink_tempfile($testFilename);
-               $this->assertEquals($resultFilePermissions, '0777');
-       }
-
-       /**
-        * @test
-        */
-       public function gifCompressFixesPermissionOfConvertedFileIfUsingGd() {
-               if (TYPO3_OS == 'WIN') {
-                       $this->markTestSkipped('gifCompressFixesPermissionOfConvertedFileIfUsingImagemagick() test not available on Windows.');
-               }
-               $testFinder = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('Tx_Phpunit_Service_TestFinder');
-               $fixtureGifFile = $testFinder->getAbsoluteCoreTestsPath() . 'Unit/t3lib/fixtures/clear.gif';
-               $GLOBALS['TYPO3_CONF_VARS']['GFX']['gdlib'] = TRUE;
-               $GLOBALS['TYPO3_CONF_VARS']['GFX']['gdlib_png'] = FALSE;
-               $GLOBALS['TYPO3_CONF_VARS']['GFX']['gif_compress'] = TRUE;
-               // Copy file to unique filename in typo3temp, set target permissions and run method
-               $testFilename = ((PATH_site . 'typo3temp/') . uniqid('test_')) . '.gif';
-               @copy($fixtureGifFile, $testFilename);
-               $GLOBALS['TYPO3_CONF_VARS']['BE']['fileCreateMask'] = '0777';
-               \TYPO3\CMS\Core\Utility\GeneralUtility::gif_compress($testFilename, 'GD');
-               // Get actual permissions and clean up
-               clearstatcache();
-               $resultFilePermissions = substr(decoct(fileperms($testFilename)), 2);
-               \TYPO3\CMS\Core\Utility\GeneralUtility::unlink_tempfile($testFilename);
-               $this->assertEquals($resultFilePermissions, '0777');
-       }
-
-       ///////////////////////////////
-       // Tests concerning png_to_gif_by_imagemagick
-       ///////////////////////////////
-       /**
-        * @test
-        */
-       public function pngToGifByImagemagickFixesPermissionsOfConvertedFile() {
-               if (TYPO3_OS == 'WIN') {
-                       $this->markTestSkipped('pngToGifByImagemagickFixesPermissionsOfConvertedFile() test not available on Windows.');
-               }
-               if (!$GLOBALS['TYPO3_CONF_VARS']['GFX']['im'] || !$GLOBALS['TYPO3_CONF_VARS']['GFX']['im_path_lzw']) {
-                       $this->markTestSkipped('pngToGifByImagemagickFixesPermissionsOfConvertedFile() test not available without imagemagick setup.');
-               }
-               $testFinder = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('Tx_Phpunit_Service_TestFinder');
-               $fixturePngFile = $testFinder->getAbsoluteCoreTestsPath() . 'Unit/t3lib/fixtures/clear.png';
-               $GLOBALS['TYPO3_CONF_VARS']['FE']['png_to_gif'] = TRUE;
-               // Copy file to unique filename in typo3temp, set target permissions and run method
-               $testFilename = ((PATH_site . 'typo3temp/') . uniqid('test_')) . '.png';
-               @copy($fixturePngFile, $testFilename);
-               $GLOBALS['TYPO3_CONF_VARS']['BE']['fileCreateMask'] = '0777';
-               $newGifFile = \TYPO3\CMS\Core\Utility\GeneralUtility::png_to_gif_by_imagemagick($testFilename);
-               // Get actual permissions and clean up
-               clearstatcache();
-               $resultFilePermissions = substr(decoct(fileperms($newGifFile)), 2);
-               \TYPO3\CMS\Core\Utility\GeneralUtility::unlink_tempfile($newGifFile);
-               $this->assertEquals($resultFilePermissions, '0777');
-       }
-
-       ///////////////////////////////
-       // Tests concerning read_png_gif
-       ///////////////////////////////
-       /**
-        * @test
-        */
-       public function readPngGifFixesPermissionsOfConvertedFile() {
-               if (TYPO3_OS == 'WIN') {
-                       $this->markTestSkipped('readPngGifFixesPermissionsOfConvertedFile() test not available on Windows.');
-               }
-               if (!$GLOBALS['TYPO3_CONF_VARS']['GFX']['im']) {
-                       $this->markTestSkipped('readPngGifFixesPermissionsOfConvertedFile() test not available without imagemagick setup.');
-               }
-               $testFinder = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('Tx_Phpunit_Service_TestFinder');
-               $testGifFile = $testFinder->getAbsoluteCoreTestsPath() . 'Unit/t3lib/fixtures/clear.gif';
-               // Set target permissions and run method
-               $GLOBALS['TYPO3_CONF_VARS']['BE']['fileCreateMask'] = '0777';
-               $newPngFile = \TYPO3\CMS\Core\Utility\GeneralUtility::read_png_gif($testGifFile, TRUE);
-               // Get actual permissions and clean up
-               clearstatcache();
-               $resultFilePermissions = substr(decoct(fileperms($newPngFile)), 2);
-               \TYPO3\CMS\Core\Utility\GeneralUtility::unlink_tempfile($newPngFile);
-               $this->assertEquals($resultFilePermissions, '0777');
-       }
-
-       ///////////////////////////
-       // Tests concerning cmpIPv4
-       ///////////////////////////
-       /**
-        * Data provider for cmpIPv4ReturnsTrueForMatchingAddress
-        *
-        * @return array Data sets
-        */
-       static public function cmpIPv4DataProviderMatching() {
-               return array(
-                       'host with full IP address' => array('127.0.0.1', '127.0.0.1'),
-                       'host with two wildcards at the end' => array('127.0.0.1', '127.0.*.*'),
-                       'host with wildcard at third octet' => array('127.0.0.1', '127.0.*.1'),
-                       'host with wildcard at second octet' => array('127.0.0.1', '127.*.0.1'),
-                       '/8 subnet' => array('127.0.0.1', '127.1.1.1/8'),
-                       '/32 subnet (match only name)' => array('127.0.0.1', '127.0.0.1/32'),
-                       '/30 subnet' => array('10.10.3.1', '10.10.3.3/30'),
-                       'host with wildcard in list with IPv4/IPv6 addresses' => array('192.168.1.1', '127.0.0.1, 1234:5678::/126, 192.168.*'),
-                       'host in list with IPv4/IPv6 addresses' => array('192.168.1.1', '::1, 1234:5678::/126, 192.168.1.1'),
-               );
-       }
-
-       /**
-        * @test
-        * @dataProvider cmpIPv4DataProviderMatching
-        */
-       public function cmpIPv4ReturnsTrueForMatchingAddress($ip, $list) {
-               $this->assertTrue(\TYPO3\CMS\Core\Utility\GeneralUtility::cmpIPv4($ip, $list));
-       }
-
-       /**
-        * Data provider for cmpIPv4ReturnsFalseForNotMatchingAddress
-        *
-        * @return array Data sets
-        */
-       static public function cmpIPv4DataProviderNotMatching() {
-               return array(
-                       'single host' => array('127.0.0.1', '127.0.0.2'),
-                       'single host with wildcard' => array('127.0.0.1', '127.*.1.1'),
-                       'single host with /32 subnet mask' => array('127.0.0.1', '127.0.0.2/32'),
-                       '/31 subnet' => array('127.0.0.1', '127.0.0.2/31'),
-                       'list with IPv4/IPv6 addresses' => array('127.0.0.1', '10.0.2.3, 192.168.1.1, ::1'),
-                       'list with only IPv6 addresses' => array('10.20.30.40', '::1, 1234:5678::/127')
-               );
-       }
-
-       /**
-        * @test
-        * @dataProvider cmpIPv4DataProviderNotMatching
-        */
-       public function cmpIPv4ReturnsFalseForNotMatchingAddress($ip, $list) {
-               $this->assertFalse(\TYPO3\CMS\Core\Utility\GeneralUtility::cmpIPv4($ip, $list));
-       }
-
-       ///////////////////////////
-       // Tests concerning cmpIPv6
-       ///////////////////////////
-       /**
-        * Data provider for cmpIPv6ReturnsTrueForMatchingAddress
-        *
-        * @return array Data sets
-        */
-       static public function cmpIPv6DataProviderMatching() {
-               return array(
-                       'empty address' => array('::', '::'),
-                       'empty with netmask in list' => array('::', '::/0'),
-                       'empty with netmask 0 and host-bits set in list' => array('::', '::123/0'),
-                       'localhost' => array('::1', '::1'),
-                       'localhost with leading zero blocks' => array('::1', '0:0::1'),
-                       'host with submask /128' => array('::1', '0:0::1/128'),
-                       '/16 subnet' => array('1234::1', '1234:5678::/16'),
-                       '/126 subnet' => array('1234:5678::3', '1234:5678::/126'),
-                       '/126 subnet with host-bits in list set' => array('1234:5678::3', '1234:5678::2/126'),
-                       'list with IPv4/IPv6 addresses' => array('1234:5678::3', '::1, 127.0.0.1, 1234:5678::/126, 192.168.1.1')
-               );
-       }
-
-       /**
-        * @test
-        * @dataProvider cmpIPv6DataProviderMatching
-        */
-       public function cmpIPv6ReturnsTrueForMatchingAddress($ip, $list) {
-               $this->assertTrue(\TYPO3\CMS\Core\Utility\GeneralUtility::cmpIPv6($ip, $list));
-       }
-
-       /**
-        * Data provider for cmpIPv6ReturnsFalseForNotMatchingAddress
-        *
-        * @return array Data sets
-        */
-       static public function cmpIPv6DataProviderNotMatching() {
-               return array(
-                       'empty against localhost' => array('::', '::1'),
-                       'empty against localhost with /128 netmask' => array('::', '::1/128'),
-                       'localhost against different host' => array('::1', '::2'),
-                       'localhost against host with prior bits set' => array('::1', '::1:1'),
-                       'host against different /17 subnet' => array('1234::1', '1234:f678::/17'),
-                       'host against different /127 subnet' => array('1234:5678::3', '1234:5678::/127'),
-                       'host against IPv4 address list' => array('1234:5678::3', '127.0.0.1, 192.168.1.1'),
-                       'host against mixed list with IPv6 host in different subnet' => array('1234:5678::3', '::1, 1234:5678::/127')
-               );
-       }
-
-       /**
-        * @test
-        * @dataProvider cmpIPv6DataProviderNotMatching
-        */
-       public function cmpIPv6ReturnsFalseForNotMatchingAddress($ip, $list) {
-               $this->assertFalse(\TYPO3\CMS\Core\Utility\GeneralUtility::cmpIPv6($ip, $list));
-       }
-
-       ///////////////////////////////
-       // Tests concerning IPv6Hex2Bin
-       ///////////////////////////////
-       /**
-        * Data provider for IPv6Hex2BinCorrect
-        *
-        * @return array Data sets
-        */
-       static public function IPv6Hex2BinDataProviderCorrect() {
-               return array(
-                       'empty 1' => array('::', str_pad('', 16, "\x00")),
-                       'empty 2, already normalized' => array('0000:0000:0000:0000:0000:0000:0000:0000', str_pad('', 16, "\x00")),
-                       'already normalized' => array('0102:0304:0000:0000:0000:0000:0506:0078', "\x01\x02\x03\x04" . str_pad('', 8, "\x00") . "\x05\x06\x00\x78"),
-                       'expansion in middle 1' => array('1::2', "\x00\x01" . str_pad('', 12, "\x00") . "\x00\x02"),
-                       'expansion in middle 2' => array('beef::fefa', "\xbe\xef" . str_pad('', 12, "\x00") . "\xfe\xfa"),
-               );
-       }
-
-       /**
-        * @test
-        * @dataProvider IPv6Hex2BinDataProviderCorrect
-        */
-       public function IPv6Hex2BinCorrectlyConvertsAddresses($hex, $binary) {
-               $this->assertTrue(\TYPO3\CMS\Core\Utility\GeneralUtility::IPv6Hex2Bin($hex) === $binary);
-       }
-
-       ///////////////////////////////
-       // Tests concerning IPv6Bin2Hex
-       ///////////////////////////////
-       /**
-        * Data provider for IPv6Bin2HexCorrect
-        *
-        * @return array Data sets
-        */
-       static public function IPv6Bin2HexDataProviderCorrect() {
-               return array(
-                       'empty' => array(str_pad('', 16, "\x00"), '::'),
-                       'non-empty front' => array("\x01" . str_pad('', 15, "\x00"), '100::'),
-                       'non-empty back' => array(str_pad('', 15, "\x00") . "\x01", '::1'),
-                       'normalized' => array("\x01\x02\x03\x04" . str_pad('', 8, "\x00") . "\x05\x06\x00\x78", '102:304::506:78'),
-                       'expansion in middle 1' => array("\x00\x01" . str_pad('', 12, "\x00") . "\x00\x02", '1::2'),
-                       'expansion in middle 2' => array("\xbe\xef" . str_pad('', 12, "\x00") . "\xfe\xfa", 'beef::fefa'),
-               );
-       }
-
-       /**
-        * @test
-        * @dataProvider IPv6Bin2HexDataProviderCorrect
-        */
-       public function IPv6Bin2HexCorrectlyConvertsAddresses($binary, $hex) {
-               if (!class_exists('t3lib_diff')) {
-                       $this->markTestSkipped('The current version of phpunit relies on t3lib_diff which is removed in 6.0 and thus this test fails. Move t3lib_diff to phpunit and reenable this test.');
-               }
-               $this->assertEquals(\TYPO3\CMS\Core\Utility\GeneralUtility::IPv6Bin2Hex($binary), $hex);
-       }
-
-       ////////////////////////////////////////////////
-       // Tests concerning normalizeIPv6 / compressIPv6
-       ////////////////////////////////////////////////
-       /**
-        * Data provider for normalizeIPv6ReturnsCorrectlyNormalizedFormat
-        *
-        * @return array Data sets
-        */
-       static public function normalizeCompressIPv6DataProviderCorrect() {
-               return array(
-                       'empty' => array('::', '0000:0000:0000:0000:0000:0000:0000:0000'),
-                       'localhost' => array('::1', '0000:0000:0000:0000:0000:0000:0000:0001'),
-                       'some address on right side' => array('::f0f', '0000:0000:0000:0000:0000:0000:0000:0f0f'),
-                       'expansion in middle 1' => array('1::2', '0001:0000:0000:0000:0000:0000:0000:0002'),
-                       'expansion in middle 2' => array('1:2::3', '0001:0002:0000:0000:0000:0000:0000:0003'),
-                       'expansion in middle 3' => array('1::2:3', '0001:0000:0000:0000:0000:0000:0002:0003'),
-                       'expansion in middle 4' => array('1:2::3:4:5', '0001:0002:0000:0000:0000:0003:0004:0005')
-               );
-       }
-
-       /**
-        * @test
-        * @dataProvider normalizeCompressIPv6DataProviderCorrect
-        */
-       public function normalizeIPv6CorrectlyNormalizesAddresses($compressed, $normalized) {
-               $this->assertEquals(\TYPO3\CMS\Core\Utility\GeneralUtility::normalizeIPv6($compressed), $normalized);
-       }
-
-       /**
-        * @test
-        * @dataProvider normalizeCompressIPv6DataProviderCorrect
-        */
-       public function compressIPv6CorrectlyCompressesAdresses($compressed, $normalized) {
-               if (!class_exists('t3lib_diff')) {
-                       $this->markTestSkipped('The current version of phpunit relies on t3lib_diff which is removed in 6.0 and thus this test fails. Move t3lib_diff to phpunit and reenable this test.');
-               }
-               $this->assertEquals(\TYPO3\CMS\Core\Utility\GeneralUtility::compressIPv6($normalized), $compressed);
-       }
-
-       ///////////////////////////////
-       // Tests concerning validIP
-       ///////////////////////////////
-       /**
-        * Data provider for checkValidIpReturnsTrueForValidIp
-        *
-        * @return array Data sets
-        */
-       static public function validIpDataProvider() {
-               return array(
-                       '0.0.0.0' => array('0.0.0.0'),
-                       'private IPv4 class C' => array('192.168.0.1'),
-                       'private IPv4 class A' => array('10.0.13.1'),
-                       'private IPv6' => array('fe80::daa2:5eff:fe8b:7dfb')
-               );
-       }
-
-       /**
-        * @test
-        * @dataProvider validIpDataProvider
-        */
-       public function validIpReturnsTrueForValidIp($ip) {
-               $this->assertTrue(\TYPO3\CMS\Core\Utility\GeneralUtility::validIP($ip));
-       }
-
-       /**
-        * Data provider for checkValidIpReturnsFalseForInvalidIp
-        *
-        * @return array Data sets
-        */
-       static public function invalidIpDataProvider() {
-               return array(
-                       'null' => array(NULL),
-                       'zero' => array(0),
-                       'string' => array('test'),
-                       'string empty' => array(''),
-                       'string NULL' => array('NULL'),
-                       'out of bounds IPv4' => array('300.300.300.300'),
-                       'dotted decimal notation with only two dots' => array('127.0.1')
-               );
-       }
-
-       /**
-        * @test
-        * @dataProvider invalidIpDataProvider
-        */
-       public function validIpReturnsFalseForInvalidIp($ip) {
-               $this->assertFalse(\TYPO3\CMS\Core\Utility\GeneralUtility::validIP($ip));
-       }
-
-       ///////////////////////////////
-       // Tests concerning cmpFQDN
-       ///////////////////////////////
-       /**
-        * Data provider for cmpFqdnReturnsTrue
-        *
-        * @return array Data sets
-        */
-       static public function cmpFqdnValidDataProvider() {
-               return array(
-                       'localhost should usually resolve, IPv4' => array('127.0.0.1', '*'),
-                       'localhost should usually resolve, IPv6' => array('::1', '*'),
-                       // other testcases with resolving not possible since it would
-                       // require a working IPv4/IPv6-connectivity
-                       'aaa.bbb.ccc.ddd.eee, full' => array('aaa.bbb.ccc.ddd.eee', 'aaa.bbb.ccc.ddd.eee'),
-                       'aaa.bbb.ccc.ddd.eee, wildcard first' => array('aaa.bbb.ccc.ddd.eee', '*.ccc.ddd.eee'),
-                       'aaa.bbb.ccc.ddd.eee, wildcard last' => array('aaa.bbb.ccc.ddd.eee', 'aaa.bbb.ccc.*'),
-                       'aaa.bbb.ccc.ddd.eee, wildcard middle' => array('aaa.bbb.ccc.ddd.eee', 'aaa.*.eee'),
-                       'list-matches, 1' => array('aaa.bbb.ccc.ddd.eee', 'xxx, yyy, zzz, aaa.*.eee'),
-                       'list-matches, 2' => array('aaa.bbb.ccc.ddd.eee', '127:0:0:1,,aaa.*.eee,::1')
-               );
-       }
-
-       /**
-        * @test
-        * @dataProvider cmpFqdnValidDataProvider
-        */
-       public function cmpFqdnReturnsTrue($baseHost, $list) {
-               $this->assertTrue(\TYPO3\CMS\Core\Utility\GeneralUtility::cmpFQDN($baseHost, $list));
-       }
-
-       /**
-        * Data provider for cmpFqdnReturnsFalse
-        *
-        * @return array Data sets
-        */
-       static public function cmpFqdnInvalidDataProvider() {
-               return array(
-                       'num-parts of hostname to check can only be less or equal than hostname, 1' => array('aaa.bbb.ccc.ddd.eee', 'aaa.bbb.ccc.ddd.eee.fff'),
-                       'num-parts of hostname to check can only be less or equal than hostname, 2' => array('aaa.bbb.ccc.ddd.eee', 'aaa.*.bbb.ccc.ddd.eee')
-               );
-       }
-
-       /**
-        * @test
-        * @dataProvider cmpFqdnInvalidDataProvider
-        */
-       public function cmpFqdnReturnsFalse($baseHost, $list) {
-               $this->assertFalse(\TYPO3\CMS\Core\Utility\GeneralUtility::cmpFQDN($baseHost, $list));
-       }
-
-       ///////////////////////////////
-       // Tests concerning inList
-       ///////////////////////////////
-       /**
-        * @test
-        * @param string $haystack
-        * @dataProvider inListForItemContainedReturnsTrueDataProvider
-        */
-       public function inListForItemContainedReturnsTrue($haystack) {
-               $this->assertTrue(\TYPO3\CMS\Core\Utility\GeneralUtility::inList($haystack, 'findme'));
-       }
-
-       /**
-        * Data provider for inListForItemContainedReturnsTrue.
-        *
-        * @return array
-        */
-       public function inListForItemContainedReturnsTrueDataProvider() {
-               return array(
-                       'Element as second element of four items' => array('one,findme,three,four'),
-                       'Element at beginning of list' => array('findme,one,two'),
-                       'Element at end of list' => array('one,two,findme'),
-                       'One item list' => array('findme')
-               );
-       }
-
-       /**
-        * @test
-        * @param string $haystack
-        * @dataProvider inListForItemNotContainedReturnsFalseDataProvider
-        */
-       public function inListForItemNotContainedReturnsFalse($haystack) {
-               $this->assertFalse(\TYPO3\CMS\Core\Utility\GeneralUtility::inList($haystack, 'findme'));
-       }
-
-       /**
-        * Data provider for inListForItemNotContainedReturnsFalse.
-        *
-        * @return array
-        */
-       public function inListForItemNotContainedReturnsFalseDataProvider() {
-               return array(
-                       'Four item list' => array('one,two,three,four'),
-                       'One item list' => array('one'),
-                       'Empty list' => array('')
-               );
-       }
-
-       ///////////////////////////////
-       // Tests concerning rmFromList
-       ///////////////////////////////
-       /**
-        * @test
-        * @param string $initialList
-        * @param string $listWithElementRemoved
-        * @dataProvider rmFromListRemovesElementsFromCommaSeparatedListDataProvider
-        */
-       public function rmFromListRemovesElementsFromCommaSeparatedList($initialList, $listWithElementRemoved) {
-               $this->assertSame($listWithElementRemoved, \TYPO3\CMS\Core\Utility\GeneralUtility::rmFromList('removeme', $initialList));
-       }
-
-       /**
-        * Data provider for rmFromListRemovesElementsFromCommaSeparatedList
-        *
-        * @return array
-        */
-       public function rmFromListRemovesElementsFromCommaSeparatedListDataProvider() {
-               return array(
-                       'Element as second element of three' => array('one,removeme,two', 'one,two'),
-                       'Element at beginning of list' => array('removeme,one,two', 'one,two'),
-                       'Element at end of list' => array('one,two,removeme', 'one,two'),
-                       'One item list' => array('removeme', ''),
-                       'Element not contained in list' => array('one,two,three', 'one,two,three'),
-                       'Empty list' => array('', '')
-               );
-       }
-
-       ///////////////////////////////
-       // Tests concerning expandList
-       ///////////////////////////////
-       /**
-        * @test
-        * @param string $list
-        * @param string $expectation
-        * @dataProvider expandListExpandsIntegerRangesDataProvider
-        */
-       public function expandListExpandsIntegerRanges($list, $expectation) {
-               $this->assertSame($expectation, \TYPO3\CMS\Core\Utility\GeneralUtility::expandList($list));
-       }
-
-       /**
-        * Data provider for expandListExpandsIntegerRangesDataProvider
-        *
-        * @return array
-        */
-       public function expandListExpandsIntegerRangesDataProvider() {
-               return array(
-                       'Expand for the same number' => array('1,2-2,7', '1,2,7'),
-                       'Small range expand with parameters reversed ignores reversed items' => array('1,5-3,7', '1,7'),
-                       'Small range expand' => array('1,3-5,7', '1,3,4,5,7'),
-                       'Expand at beginning' => array('3-5,1,7', '3,4,5,1,7'),
-                       'Expand at end' => array('1,7,3-5', '1,7,3,4,5'),
-                       'Multiple small range expands' => array('1,3-5,7-10,12', '1,3,4,5,7,8,9,10,12'),
-                       'One item list' => array('1-5', '1,2,3,4,5'),
-                       'Nothing to expand' => array('1,2,3,4', '1,2,3,4'),
-                       'Empty list' => array('', '')
-               );
-       }
-
-       /**
-        * @test
-        */
-       public function expandListExpandsForTwoThousandElementsExpandsOnlyToThousandElementsMaximum() {
-               $list = \TYPO3\CMS\Core\Utility\GeneralUtility::expandList('1-2000');
-               $this->assertSame(1000, count(explode(',', $list)));
-       }
-
-       ///////////////////////////////
-       // Tests concerning uniqueList
-       ///////////////////////////////
-       /**
-        * @test
-        * @param string $initialList
-        * @param string $unifiedList
-        * @dataProvider uniqueListUnifiesCommaSeparatedListDataProvider
-        */
-       public function uniqueListUnifiesCommaSeparatedList($initialList, $unifiedList) {
-               $this->assertSame($unifiedList, \TYPO3\CMS\Core\Utility\GeneralUtility::uniqueList($initialList));
-       }
-
-       /**
-        * Data provider for uniqueListUnifiesCommaSeparatedList
-        *
-        * @return array
-        */
-       public function uniqueListUnifiesCommaSeparatedListDataProvider() {
-               return array(
-                       'List without duplicates' => array('one,two,three', 'one,two,three'),
-                       'List with two consecutive duplicates' => array('one,two,two,three,three', 'one,two,three'),
-                       'List with non-consecutive duplicates' => array('one,two,three,two,three', 'one,two,three'),
-                       'One item list' => array('one', 'one'),
-                       'Empty list' => array('', '')
-               );
-       }
-
-       ///////////////////////////////
-       // Tests concerning isFirstPartOfStr
-       ///////////////////////////////
-       /**
-        * Data provider for isFirstPartOfStrReturnsTrueForMatchingFirstParts
-        *
-        * @return array
-        */
-       public function isFirstPartOfStrReturnsTrueForMatchingFirstPartDataProvider() {
-               return array(
-                       'match first part of string' => array('hello world', 'hello'),
-                       'match whole string' => array('hello', 'hello'),
-                       'integer is part of string with same number' => array('24', 24),
-                       'string is part of integer with same number' => array(24, '24'),
-                       'integer is part of string starting with same number' => array('24 beer please', 24)
-               );
-       }
-
-       /**
-        * @test
-        * @dataProvider isFirstPartOfStrReturnsTrueForMatchingFirstPartDataProvider
-        */
-       public function isFirstPartOfStrReturnsTrueForMatchingFirstPart($string, $part) {
-               $this->assertTrue(\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($string, $part));
-       }
-
-       /**
-        * Data provider for checkIsFirstPartOfStrReturnsFalseForNotMatchingFirstParts
-        *
-        * @return array
-        */
-       public function isFirstPartOfStrReturnsFalseForNotMatchingFirstPartDataProvider() {
-               return array(
-                       'no string match' => array('hello', 'bye'),
-                       'no case sensitive string match' => array('hello world', 'Hello'),
-                       'array is not part of string' => array('string', array()),
-                       'string is not part of array' => array(array(), 'string'),
-                       'NULL is not part of string' => array('string', NULL),
-                       'string is not part of array' => array(NULL, 'string'),
-                       'NULL is not part of array' => array(array(), NULL),
-                       'array is not part of string' => array(NULL, array()),
-                       'empty string is not part of empty string' => array('', ''),
-                       'NULL is not part of empty string' => array('', NULL),
-                       'false is not part of empty string' => array('', FALSE),
-                       'empty string is not part of NULL' => array(NULL, ''),
-                       'empty string is not part of false' => array(FALSE, ''),
-                       'empty string is not part of zero integer' => array(0, ''),
-                       'zero integer is not part of NULL' => array(NULL, 0),
-                       'zero integer is not part of empty string' => array('', 0)
-               );
-       }
-
-       /**
-        * @test
-        * @dataProvider isFirstPartOfStrReturnsFalseForNotMatchingFirstPartDataProvider
-        */
-       public function isFirstPartOfStrReturnsFalseForNotMatchingFirstPart($string, $part) {
-               $this->assertFalse(\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($string, $part));
-       }
-
-       ///////////////////////////////
-       // Tests concerning formatSize
-       ///////////////////////////////
-       /**
-        * @test
-        * @dataProvider formatSizeDataProvider
-        */
-       public function formatSizeTranslatesBytesToHigherOrderRepresentation($size, $label, $expected) {
-               $this->assertEquals($expected, \TYPO3\CMS\Core\Utility\GeneralUtility::formatSize($size, $label));
-       }
-
-       /**
-        * Data provider for formatSizeTranslatesBytesToHigherOrderRepresentation
-        *
-        * @return array
-        */
-       public function formatSizeDataProvider() {
-               return array(
-                       'Bytes keep beeing bytes (min)' => array(1, '', '1 '),
-                       'Bytes keep beeing bytes (max)' => array(899, '', '899 '),
-                       'Kilobytes are detected' => array(1024, '', '1.0 K'),
-                       'Megabytes are detected' => array(1048576, '', '1.0 M'),
-                       'Gigabytes are detected' => array(1073741824, '', '1.0 G'),
-                       'Decimal is omitted for large kilobytes' => array(31080, '', '30 K'),
-                       'Decimal is omitted for large megabytes' => array(31458000, '', '30 M'),
-                       'Decimal is omitted for large gigabytes' => array(32212254720, '', '30 G'),
-                       'Label for bytes can be exchanged' => array(1, ' Foo|||', '1 Foo'),
-                       'Label for kilobytes can be exchanged' => array(1024, '| Foo||', '1.0 Foo'),
-                       'Label for megabyes can be exchanged' => array(1048576, '|| Foo|', '1.0 Foo'),
-                       'Label for gigabytes can be exchanged' => array(1073741824, '||| Foo', '1.0 Foo')
-               );
-       }
-
-       ///////////////////////////////
-       // Tests concerning splitCalc
-       ///////////////////////////////
-       /**
-        * Data provider for splitCalc
-        *
-        * @return array expected values, arithmetic expression
-        */
-       public function splitCalcDataProvider() {
-               return array(
-                       'empty string returns empty array' => array(
-                               array(),
-                               ''
-                       ),
-                       'number without operator returns array with plus and number' => array(
-                               array(array('+', 42)),
-                               '42'
-                       ),
-                       'two numbers with asterisk return first number with plus and second number with asterisk' => array(
-                               array(array('+', 42), array('*', 31)),
-                               '42 * 31'
-                       )
-               );
-       }
-
-       /**
-        * @test
-        * @dataProvider splitCalcDataProvider
-        */
-       public function splitCalcCorrectlySplitsExpression($expected, $expression) {
-               $this->assertEquals($expected, \TYPO3\CMS\Core\Utility\GeneralUtility::splitCalc($expression, '+-*/'));
-       }
-
-       ///////////////////////////////
-       // Tests concerning htmlspecialchars_decode
-       ///////////////////////////////
-       /**
-        * @test
-        */
-       public function htmlspecialcharsDecodeReturnsDecodedString() {
-               $string = '<typo3 version="6.0">&nbsp;</typo3>';
-               $encoded = htmlspecialchars($string);
-               $decoded = \TYPO3\CMS\Core\Utility\GeneralUtility::htmlspecialchars_decode($encoded);
-               $this->assertEquals($string, $decoded);
-       }
-
-       ///////////////////////////////
-       // Tests concerning deHSCentities
-       ///////////////////////////////
-       /**
-        * @test
-        * @dataProvider deHSCentitiesReturnsDecodedStringDataProvider
-        */
-       public function deHSCentitiesReturnsDecodedString($input, $expected) {
-               $this->assertEquals($expected, \TYPO3\CMS\Core\Utility\GeneralUtility::deHSCentities($input));
-       }
-
-       /**
-        * Data provider for deHSCentitiesReturnsDecodedString
-        *
-        * @return array
-        */
-       public function deHSCentitiesReturnsDecodedStringDataProvider() {
-               return array(
-                       'Empty string' => array('', ''),
-                       'Double encoded &' => array('&amp;amp;', '&amp;'),
-                       'Double encoded numeric entity' => array('&amp;#1234;', '&#1234;'),
-                       'Double encoded hexadecimal entity' => array('&amp;#x1b;', '&#x1b;'),
-                       'Single encoded entities are not touched' => array('&amp; &#1234; &#x1b;', '&amp; &#1234; &#x1b;')
-               );
-       }
-
-       //////////////////////////////////
-       // Tests concerning slashJS
-       //////////////////////////////////
-       /**
-        * @test
-        * @dataProvider slashJsDataProvider
-        */
-       public function slashJsEscapesSingleQuotesAndSlashes($input, $extended, $expected) {
-               $this->assertEquals($expected, \TYPO3\CMS\Core\Utility\GeneralUtility::slashJS($input, $extended));
-       }
-
-       /**
-        * Data provider for slashJsEscapesSingleQuotesAndSlashes
-        *
-        * @return array
-        */
-       public function slashJsDataProvider() {
-               return array(
-                       'Empty string is not changed' => array('', FALSE, ''),
-                       'Normal string is not changed' => array('The cake is a lie √', FALSE, 'The cake is a lie √'),
-                       'String with single quotes' => array('The \'cake\' is a lie', FALSE, 'The \\\'cake\\\' is a lie'),
-                       'String with single quotes and backslashes - just escape single quotes' => array('The \\\'cake\\\' is a lie', FALSE, 'The \\\\\'cake\\\\\' is a lie'),
-                       'String with single quotes and backslashes - escape both' => array('The \\\'cake\\\' is a lie', TRUE, 'The \\\\\\\'cake\\\\\\\' is a lie')
-               );
-       }
-
-       //////////////////////////////////
-       // Tests concerning rawUrlEncodeJS
-       //////////////////////////////////
-       /**
-        * @test
-        */
-       public function rawUrlEncodeJsPreservesWhitespaces() {
-               $input = 'Encode \'me\', but leave my spaces √';
-               $expected = 'Encode %27me%27%2C but leave my spaces %E2%88%9A';
-               $this->assertEquals($expected, \TYPO3\CMS\Core\Utility\GeneralUtility::rawUrlEncodeJS($input));
-       }
-
-       //////////////////////////////////
-       // Tests concerning rawUrlEncodeJS
-       //////////////////////////////////
-       /**
-        * @test
-        */
-       public function rawUrlEncodeFpPreservesSlashes() {
-               $input = 'Encode \'me\', but leave my / √';
-               $expected = 'Encode%20%27me%27%2C%20but%20leave%20my%20/%20%E2%88%9A';
-               $this->assertEquals($expected, \TYPO3\CMS\Core\Utility\GeneralUtility::rawUrlEncodeFP($input));
-       }
-
-       //////////////////////////////////
-       // Tests concerning strtoupper / strtolower
-       //////////////////////////////////
-       /**
-        * Data provider for strtoupper and strtolower
-        *
-        * @return array
-        */
-       public function strtouppperDataProvider() {
-               return array(
-                       'Empty string' => array('', ''),
-                       'String containing only latin characters' => array('the cake is a lie.', 'THE CAKE IS A LIE.'),
-                       'String with umlauts and accent characters' => array('the càkê is ä lie.', 'THE CàKê IS ä LIE.')
-               );
-       }
-
-       /**
-        * @test
-        * @dataProvider strtouppperDataProvider
-        */
-       public function strtoupperConvertsOnlyLatinCharacters($input, $expected) {
-               $this->assertEquals($expected, \TYPO3\CMS\Core\Utility\GeneralUtility::strtoupper($input));
-       }
-
-       /**
-        * @test
-        * @dataProvider strtouppperDataProvider
-        */
-       public function strtolowerConvertsOnlyLatinCharacters($expected, $input) {
-               $this->assertEquals($expected, \TYPO3\CMS\Core\Utility\GeneralUtility::strtolower($input));
-       }
-
-       //////////////////////////////////
-       // Tests concerning validEmail
-       //////////////////////////////////
-       /**
-        * Data provider for valid validEmail's
-        *
-        * @return array Valid email addresses
-        */
-       public function validEmailValidDataProvider() {
-               return array(
-                       'short mail address' => array('a@b.c'),
-                       'simple mail address' => array('test@example.com'),
-                       'uppercase characters' => array('QWERTYUIOPASDFGHJKLZXCVBNM@QWERTYUIOPASDFGHJKLZXCVBNM.NET'),
-                       // Fix / change if TYPO3 php requirement changed: Address ok with 5.2.6 and 5.3.2 but fails with 5.3.0 on windows
-                       // 'equal sign in local part' => array('test=mail@example.com'),
-                       'dash in local part' => array('test-mail@example.com'),
-                       'plus in local part' => array('test+mail@example.com'),
-                       // Fix / change if TYPO3 php requirement changed: Address ok with 5.2.6 and 5.3.2 but fails with 5.3.0 on windows
-                       // 'question mark in local part' => array('test?mail@example.com'),
-                       'slash in local part' => array('foo/bar@example.com'),
-                       'hash in local part' => array('foo#bar@example.com'),
-                       // Fix / change if TYPO3 php requirement changed: Address ok with 5.2.6 and 5.3.2 but fails with 5.3.0 on windows
-                       // 'dot in local part' => array('firstname.lastname@employee.2something.com'),
-                       // Fix / change if TYPO3 php requirement changed: Address ok with 5.2.6, but not ok with 5.3.2
-                       // 'dash as local part' => array('-@foo.com'),
-                       'umlauts in local part' => array('äöüfoo@bar.com'),
-                       'umlauts in domain part' => array('foo@äöüfoo.com')
-               );
-       }
-
-       /**
-        * @test
-        * @dataProvider validEmailValidDataProvider
-        */
-       public function validEmailReturnsTrueForValidMailAddress($address) {
-               $this->assertTrue(\TYPO3\CMS\Core\Utility\GeneralUtility::validEmail($address));
-       }
-
-       /**
-        * Data provider for invalid validEmail's
-        *
-        * @return array Invalid email addresses
-        */
-       public function validEmailInvalidDataProvider() {
-               return array(
-                       '@ sign only' => array('@'),
-                       'duplicate @' => array('test@@example.com'),
-                       'duplicate @ combined with further special characters in local part' => array('test!.!@#$%^&*@example.com'),
-                       'opening parenthesis in local part' => array('foo(bar@example.com'),
-                       'closing parenthesis in local part' => array('foo)bar@example.com'),
-                       'opening square bracket in local part' => array('foo[bar@example.com'),
-                       'closing square bracket as local part' => array(']@example.com'),
-                       // Fix / change if TYPO3 php requirement changed: Address ok with 5.2.6, but not ok with 5.3.2
-                       // 'top level domain only' => array('test@com'),
-                       'dash as second level domain' => array('foo@-.com'),
-                       'domain part starting with dash' => array('foo@-foo.com'),
-                       'domain part ending with dash' => array('foo@foo-.com'),
-                       'number as top level domain' => array('foo@bar.123'),
-                       // Fix / change if TYPO3 php requirement changed: Address not ok with 5.2.6, but ok with 5.3.2 (?)
-                       // 'dash as top level domain' => array('foo@bar.-'),
-                       'dot at beginning of domain part' => array('test@.com'),
-                       // Fix / change if TYPO3 php requirement changed: Address ok with 5.2.6, but not ok with 5.3.2
-                       // 'local part ends with dot' => array('e.x.a.m.p.l.e.@example.com'),
-                       'trailing whitespace' => array('test@example.com '),
-                       'trailing carriage return' => array('test@example.com' . CR),
-                       'trailing linefeed' => array('test@example.com' . LF),
-                       'trailing carriage return linefeed' => array('test@example.com' . CRLF),
-                       'trailing tab' => array('test@example.com' . TAB)
-               );
-       }
-
-       /**
-        * @test
-        * @dataProvider validEmailInvalidDataProvider
-        */
-       public function validEmailReturnsFalseForInvalidMailAddress($address) {
-               $this->assertFalse(\TYPO3\CMS\Core\Utility\GeneralUtility::validEmail($address));
-       }
-
-       //////////////////////////////////
-       // Tests concerning inArray
-       //////////////////////////////////
-       /**
-        * @test
-        * @dataProvider inArrayDataProvider
-        */
-       public function inArrayChecksStringExistenceWithinArray($array, $item, $expected) {
-               $this->assertEquals($expected, \TYPO3\CMS\Core\Utility\GeneralUtility::inArray($array, $item));
-       }
-
-       /**
-        * Data provider for inArrayChecksStringExistenceWithinArray
-        *
-        * @return array
-        */
-       public function inArrayDataProvider() {
-               return array(
-                       'Empty array' => array(array(), 'search', FALSE),
-                       'One item array no match' => array(array('one'), 'two', FALSE),
-                       'One item array match' => array(array('one'), 'one', TRUE),
-                       'Multiple items array no match' => array(array('one', 2, 'three', 4), 'four', FALSE),
-                       'Multiple items array match' => array(array('one', 2, 'three', 4), 'three', TRUE),
-                       'Integer search items can match string values' => array(array('0', '1', '2'), 1, TRUE),
-                       'Search item is not casted to integer for a match' => array(array(4), '4a', FALSE),
-                       'Empty item won\'t match - in contrast to the php-builtin ' => array(array(0, 1, 2), '', FALSE)
-               );
-       }
-
-       //////////////////////////////////
-       // Tests concerning intExplode
-       //////////////////////////////////
-       /**
-        * @test
-        */
-       public function intExplodeConvertsStringsToInteger() {
-               $testString = '1,foo,2';
-               $expectedArray = array(1, 0, 2);
-               $actualArray = \TYPO3\CMS\Core\Utility\GeneralUtility::intExplode(',', $testString);
-               $this->assertEquals($expectedArray, $actualArray);
-       }
-
-       //////////////////////////////////
-       // Tests concerning keepItemsInArray
-       //////////////////////////////////
-       /**
-        * @test
-        * @dataProvider keepItemsInArrayWorksWithOneArgumentDataProvider
-        */
-       public function keepItemsInArrayWorksWithOneArgument($search, $array, $expected) {
-               $this->assertEquals($expected, \TYPO3\CMS\Core\Utility\GeneralUtility::keepItemsInArray($array, $search));
-       }
-
-       /**
-        * Data provider for keepItemsInArrayWorksWithOneArgument
-        *
-        * @return array
-        */
-       public function keepItemsInArrayWorksWithOneArgumentDataProvider() {
-               $array = array(
-                       'one' => 'one',
-                       'two' => 'two',
-                       'three' => 'three'
-               );
-               return array(
-                       'Empty argument will match "all" elements' => array(NULL, $array, $array),
-                       'No match' => array('four', $array, array()),
-                       'One match' => array('two', $array, array('two' => 'two')),
-                       'Multiple matches' => array('two,one', $array, array('one' => 'one', 'two' => 'two')),
-                       'Argument can be an array' => array(array('three'), $array, array('three' => 'three'))
-               );
-       }
-
-       /**
-        * Shows the exmaple from the doc comment where
-        * a function is used to reduce the sub arrays to one item which
-        * is then used for the matching.
-        *
-        * @test
-        */
-       public function keepItemsInArrayCanUseCallbackOnSearchArray() {
-               $array = array(
-                       'aa' => array('first', 'second'),
-                       'bb' => array('third', 'fourth'),
-                       'cc' => array('fifth', 'sixth')
-               );
-               $expected = array('bb' => array('third', 'fourth'));
-               $keepItems = 'third';
-               $getValueFunc = create_function('$value', 'return $value[0];');
-               $match = \TYPO3\CMS\Core\Utility\GeneralUtility::keepItemsInArray($array, $keepItems, $getValueFunc);
-               $this->assertEquals($expected, $match);
-       }
-
-       //////////////////////////////////
-       // Tests concerning implodeArrayForUrl / explodeUrl2Array
-       //////////////////////////////////
-       /**
-        * Data provider for implodeArrayForUrlBuildsValidParameterString and
-        * explodeUrl2ArrayTransformsParameterStringToArray
-        *
-        * @return array
-        */
-       public function implodeArrayForUrlDataProvider() {
-               $valueArray = array('one' => '√', 'two' => 2);
-               return array(
-                       'Empty input' => array('foo', array(), ''),
-                       'String parameters' => array('foo', $valueArray, '&foo[one]=%E2%88%9A&foo[two]=2'),
-                       'Nested array parameters' => array('foo', array($valueArray), '&foo[0][one]=%E2%88%9A&foo[0][two]=2'),
-                       'Keep blank parameters' => array('foo', array('one' => '√', ''), '&foo[one]=%E2%88%9A&foo[0]=')
-               );
-       }
-
-       /**
-        * @test
-        * @dataProvider implodeArrayForUrlDataProvider
-        */
-       public function implodeArrayForUrlBuildsValidParameterString($name, $input, $expected) {
-               $this->assertSame($expected, \TYPO3\CMS\Core\Utility\GeneralUtility::implodeArrayForUrl($name, $input));
-       }
-
-       /**
-        * @test
-        */
-       public function implodeArrayForUrlCanSkipEmptyParameters() {
-               $input = array('one' => '√', '');
-               $expected = '&foo[one]=%E2%88%9A';
-               $this->assertSame($expected, \TYPO3\CMS\Core\Utility\GeneralUtility::implodeArrayForUrl('foo', $input, '', TRUE));
-       }
-
-       /**
-        * @test
-        */
-       public function implodeArrayForUrlCanUrlEncodeKeyNames() {
-               $input = array('one' => '√', '');
-               $expected = '&foo%5Bone%5D=%E2%88%9A&foo%5B0%5D=';
-               $this->assertSame($expected, \TYPO3\CMS\Core\Utility\GeneralUtility::implodeArrayForUrl('foo', $input, '', FALSE, TRUE));
-       }
-
-       /**
-        * @test
-        * @dataProvider implodeArrayForUrlDataProvider
-        */
-       public function explodeUrl2ArrayTransformsParameterStringToNestedArray($name, $array, $input) {
-               $expected = $array ? array($name => $array) : array();
-               $this->assertEquals($expected, \TYPO3\CMS\Core\Utility\GeneralUtility::explodeUrl2Array($input, TRUE));
-       }
-
-       /**
-        * @test
-        * @dataProvider explodeUrl2ArrayDataProvider
-        */
-       public function explodeUrl2ArrayTransformsParameterStringToFlatArray($input, $expected) {
-               $this->assertEquals($expected, \TYPO3\CMS\Core\Utility\GeneralUtility::explodeUrl2Array($input, FALSE));
-       }
-
-       /**
-        * Data provider for explodeUrl2ArrayTransformsParameterStringToFlatArray
-        *
-        * @return array
-        */
-       public function explodeUrl2ArrayDataProvider() {
-               return array(
-                       'Empty string' => array('', array()),
-                       'Simple parameter string' => array('&one=%E2%88%9A&two=2', array('one' => '√', 'two' => 2)),
-                       'Nested parameter string' => array('&foo[one]=%E2%88%9A&two=2', array('foo[one]' => '√', 'two' => 2))
-               );
-       }
-
-       //////////////////////////////////
-       // Tests concerning compileSelectedGetVarsFromArray
-       //////////////////////////////////
-       /**
-        * @test
-        */
-       public function compileSelectedGetVarsFromArrayFiltersIncomingData() {
-               $filter = 'foo,bar';
-               $getArray = array('foo' => 1, 'cake' => 'lie');
-               $expected = array('foo' => 1);
-               $result = \TYPO3\CMS\Core\Utility\GeneralUtility::compileSelectedGetVarsFromArray($filter, $getArray, FALSE);
-               $this->assertSame($expected, $result);
-       }
-
-       /**
-        * @test
-        */
-       public function compileSelectedGetVarsFromArrayUsesGetPostDataFallback() {
-               $_GET['bar'] = '2';
-               $filter = 'foo,bar';
-               $getArray = array('foo' => 1, 'cake' => 'lie');
-               $expected = array('foo' => 1, 'bar' => '2');
-               $result = \TYPO3\CMS\Core\Utility\GeneralUtility::compileSelectedGetVarsFromArray($filter, $getArray, TRUE);
-               $this->assertSame($expected, $result);
-       }
-
-       //////////////////////////////////
-       // Tests concerning remapArrayKeys
-       //////////////////////////////////
-       /**
-        * @test
-        */
-       public function remapArrayKeysExchangesKeysWithGivenMapping() {
-               $array = array(
-                       'one' => 'one',
-                       'two' => 'two',
-                       'three' => 'three'
-               );
-               $keyMapping = array(
-                       'one' => '1',
-                       'two' => '2'
-               );
-               $expected = array(
-                       '1' => 'one',
-                       '2' => 'two',
-                       'three' => 'three'
-               );
-               \TYPO3\CMS\Core\Utility\GeneralUtility::remapArrayKeys($array, $keyMapping);
-               $this->assertEquals($expected, $array);
-       }
-
-       //////////////////////////////////
-       // Tests concerning array_merge
-       //////////////////////////////////
-       /**
-        * Test demonstrating array_merge. This is actually
-        * a native PHP operator, therefore this test is mainly used to
-        * show how this function can be used.
-        *
-        * @test
-        */
-       public function arrayMergeKeepsIndexesAfterMerge() {
-               $array1 = array(10 => 'FOO', '20' => 'BAR');
-               $array2 = array('5' => 'PLONK');
-               $expected = array('5' => 'PLONK', 10 => 'FOO', '20' => 'BAR');
-               $this->assertEquals($expected, \TYPO3\CMS\Core\Utility\GeneralUtility::array_merge($array1, $array2));
-       }
-
-       //////////////////////////////////
-       // Tests concerning int_from_ver
-       //////////////////////////////////
-       /**
-        * Data Provider for intFromVerConvertsVersionNumbersToIntegersDataProvider
-        *
-        * return array
-        */
-       public function intFromVerConvertsVersionNumbersToIntegersDataProvider() {
-               return array(
-                       array('4003003', '4.3.3'),
-                       array('4012003', '4.12.3'),
-                       array('5000000', '5.0.0'),
-                       array('3008001', '3.8.1'),
-                       array('1012', '0.1.12')
-               );
-       }
-
-       /**
-        * @test
-        * @dataProvider intFromVerConvertsVersionNumbersToIntegersDataProvider
-        */
-       public function intFromVerConvertsVersionNumbersToIntegers($expected, $version) {
-               $this->assertEquals($expected, \TYPO3\CMS\Core\Utility\GeneralUtility::int_from_ver($version));
-       }
-
-       //////////////////////////////////
-       // Tests concerning revExplode
-       //////////////////////////////////
-       /**
-        * @test
-        */
-       public function revExplodeExplodesString() {
-               $testString = 'my:words:here';
-               $expectedArray = array('my:words', 'here');
-               $actualArray = \TYPO3\CMS\Core\Utility\GeneralUtility::revExplode(':', $testString, 2);
-               $this->assertEquals($expectedArray, $actualArray);
-       }
-
-       //////////////////////////////////
-       // Tests concerning trimExplode
-       //////////////////////////////////
-       /**
-        * @test
-        */
-       public function checkTrimExplodeTrimsSpacesAtElementStartAndEnd() {
-               $testString = ' a , b , c ,d ,,  e,f,';
-               $expectedArray = array('a', 'b', 'c', 'd', '', 'e', 'f', '');
-               $actualArray = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $testString);
-               $this->assertEquals($expectedArray, $actualArray);
-       }
-
-       /**
-        * @test
-        */
-       public function checkTrimExplodeRemovesNewLines() {
-               $testString = (' a , b , ' . LF) . ' ,d ,,  e,f,';
-               $expectedArray = array('a', 'b', 'd', 'e', 'f');
-               $actualArray = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $testString, TRUE);
-               $this->assertEquals($expectedArray, $actualArray);
-       }
-
-       /**
-        * @test
-        */
-       public function checkTrimExplodeRemovesEmptyElements() {
-               $testString = 'a , b , c , ,d ,, ,e,f,';
-               $expectedArray = array('a', 'b', 'c', 'd', 'e', 'f');
-               $actualArray = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $testString, TRUE);
-               $this->assertEquals($expectedArray, $actualArray);
-       }
-
-       /**
-        * @test
-        */
-       public function checkTrimExplodeKeepsRemainingResultsWithEmptyItemsAfterReachingLimitWithPositiveParameter() {
-               $testString = ' a , b , c , , d,, ,e ';
-               $expectedArray = array('a', 'b', 'c,,d,,,e');
-               // Limiting returns the rest of the string as the last element
-               $actualArray = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $testString, FALSE, 3);
-               $this->assertEquals($expectedArray, $actualArray);
-       }
-
-       /**
-        * @test
-        */
-       public function checkTrimExplodeKeepsRemainingResultsWithoutEmptyItemsAfterReachingLimitWithPositiveParameter() {
-               $testString = ' a , b , c , , d,, ,e ';
-               $expectedArray = array('a', 'b', 'c,d,e');
-               // Limiting returns the rest of the string as the last element
-               $actualArray = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $testString, TRUE, 3);
-               $this->assertEquals($expectedArray, $actualArray);
-       }
-
-       /**
-        * @test
-        */
-       public function checkTrimExplodeKeepsRamainingResultsWithEmptyItemsAfterReachingLimitWithNegativeParameter() {
-               $testString = ' a , b , c , d, ,e, f , , ';
-               $expectedArray = array('a', 'b', 'c', 'd', '', 'e');
-               // limiting returns the rest of the string as the last element
-               $actualArray = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $testString, FALSE, -3);
-               $this->assertEquals($expectedArray, $actualArray);
-       }
-
-       /**
-        * @test
-        */
-       public function checkTrimExplodeKeepsRamainingResultsWithoutEmptyItemsAfterReachingLimitWithNegativeParameter() {
-               $testString = ' a , b , c , d, ,e, f , , ';
-               $expectedArray = array('a', 'b', 'c');
-               // Limiting returns the rest of the string as the last element
-               $actualArray = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $testString, TRUE, -3);
-               $this->assertEquals($expectedArray, $actualArray);
-       }
-
-       /**
-        * @test
-        */
-       public function checkTrimExplodeReturnsExactResultsWithoutReachingLimitWithPositiveParameter() {
-               $testString = ' a , b , , c , , , ';
-               $expectedArray = array('a', 'b', 'c');
-               // Limiting returns the rest of the string as the last element
-               $actualArray = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $testString, TRUE, 4);
-               $this->assertEquals($expectedArray, $actualArray);
-       }
-
-       /**
-        * @test
-        */
-       public function checkTrimExplodeKeepsZeroAsString() {
-               $testString = 'a , b , c , ,d ,, ,e,f, 0 ,';
-               $expectedArray = array('a', 'b', 'c', 'd', 'e', 'f', '0');
-               $actualArray = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $testString, TRUE);
-               $this->assertEquals($expectedArray, $actualArray);
-       }
-
-       //////////////////////////////////
-       // Tests concerning removeArrayEntryByValue
-       //////////////////////////////////
-       /**
-        * @test
-        */
-       public function checkRemoveArrayEntryByValueRemovesEntriesFromOneDimensionalArray() {
-               $inputArray = array(
-                       '0' => 'test1',
-                       '1' => 'test2',
-                       '2' => 'test3',
-                       '3' => 'test2'
-               );
-               $compareValue = 'test2';
-               $expectedResult = array(
-                       '0' => 'test1',
-                       '2' => 'test3'
-               );
-               $actualResult = \TYPO3\CMS\Core\Utility\GeneralUtility::removeArrayEntryByValue($inputArray, $compareValue);
-               $this->assertEquals($expectedResult, $actualResult);
-       }
-
-       /**
-        * @test
-        */
-       public function checkRemoveArrayEntryByValueRemovesEntriesFromMultiDimensionalArray() {
-               $inputArray = array(
-                       '0' => 'foo',
-                       '1' => array(
-                               '10' => 'bar'
-                       ),
-                       '2' => 'bar'
-               );
-               $compareValue = 'bar';
-               $expectedResult = array(
-                       '0' => 'foo',
-                       '1' => array()
-               );
-               $actualResult = \TYPO3\CMS\Core\Utility\GeneralUtility::removeArrayEntryByValue($inputArray, $compareValue);
-               $this->assertEquals($expectedResult, $actualResult);
-       }
-
-       /**
-        * @test
-        */
-       public function checkRemoveArrayEntryByValueRemovesEntryWithEmptyString() {
-               $inputArray = array(
-                       '0' => 'foo',
-                       '1' => '',
-                       '2' => 'bar'
-               );
-               $compareValue = '';
-               $expectedResult = array(
-                       '0' => 'foo',
-                       '2' => 'bar'
-               );
-               $actualResult = \TYPO3\CMS\Core\Utility\GeneralUtility::removeArrayEntryByValue($inputArray, $compareValue);
-               $this->assertEquals($expectedResult, $actualResult);
-       }
-
-       //////////////////////////////////
-       // Tests concerning getBytesFromSizeMeasurement
-       //////////////////////////////////
-       /**
-        * Data provider for getBytesFromSizeMeasurement
-        *
-        * @return array expected value, input string
-        */
-       public function getBytesFromSizeMeasurementDataProvider() {
-               return array(
-                       '100 kilo Bytes' => array('102400', '100k'),
-                       '100 mega Bytes' => array('104857600', '100m'),
-                       '100 giga Bytes' => array('107374182400', '100g')
-               );
-       }
-
-       /**
-        * @test
-        * @dataProvider getBytesFromSizeMeasurementDataProvider
-        */
-       public function getBytesFromSizeMeasurementCalculatesCorrectByteValue($expected, $byteString) {
-               $this->assertEquals($expected, \TYPO3\CMS\Core\Utility\GeneralUtility::getBytesFromSizeMeasurement($byteString));
-       }
-
-       //////////////////////////////////
-       // Tests concerning getIndpEnv
-       //////////////////////////////////
-       /**
-        * @test
-        */
-       public function getIndpEnvTypo3SitePathReturnNonEmptyString() {
-               $this->assertTrue(strlen(\TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_SITE_PATH')) >= 1);
-       }
-
-       /**
-        * @test
-        */
-       public function getIndpEnvTypo3SitePathReturnsStringStartingWithSlash() {
-               $result = \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_SITE_PATH');
-               $this->assertEquals('/', $result[0]);
-       }
-
-       /**
-        * @test
-        */
-       public function getIndpEnvTypo3SitePathReturnsStringEndingWithSlash() {
-               $result = \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_SITE_PATH');
-               $this->assertEquals('/', $result[strlen($result) - 1]);
-       }
-
-       /**
-        * @return array
-        */
-       static public function hostnameAndPortDataProvider() {
-               return array(
-                       'localhost ipv4 without port' => array('127.0.0.1', '127.0.0.1', ''),
-                       'localhost ipv4 with port' => array('127.0.0.1:81', '127.0.0.1', '81'),
-                       'localhost ipv6 without port' => array('[::1]', '[::1]', ''),
-                       'localhost ipv6 with port' => array('[::1]:81', '[::1]', '81'),
-                       'ipv6 without port' => array('[2001:DB8::1]', '[2001:DB8::1]', ''),
-                       'ipv6 with port' => array('[2001:DB8::1]:81', '[2001:DB8::1]', '81'),
-                       'hostname without port' => array('lolli.did.this', 'lolli.did.this', ''),
-                       'hostname with port' => array('lolli.did.this:42', 'lolli.did.this', '42')
-               );
-       }
-
-       /**
-        * @test
-        * @dataProvider hostnameAndPortDataProvider
-        */
-       public function getIndpEnvTypo3HostOnlyParsesHostnamesAndIpAdresses($httpHost, $expectedIp) {
-               $_SERVER['HTTP_HOST'] = $httpHost;
-               $this->assertEquals($expectedIp, \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_HOST_ONLY'));
-       }
-
-       /**
-        * @test
-        * @dataProvider hostnameAndPortDataProvider
-        */
-       public function getIndpEnvTypo3PortParsesHostnamesAndIpAdresses($httpHost, $dummy, $expectedPort) {
-               $_SERVER['HTTP_HOST'] = $httpHost;
-               $this->assertEquals($expectedPort, \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_PORT'));
-       }
-
-       //////////////////////////////////
-       // Tests concerning underscoredToUpperCamelCase
-       //////////////////////////////////
-       /**
-        * Data provider for underscoredToUpperCamelCase
-        *
-        * @return array expected, input string
-        */
-       public function underscoredToUpperCamelCaseDataProvider() {
-               return array(
-                       'single word' => array('Blogexample', 'blogexample'),
-                       'multiple words' => array('BlogExample', 'blog_example')
-               );
-       }
-
-       /**
-        * @test
-        * @dataProvider underscoredToUpperCamelCaseDataProvider
-        */
-       public function underscoredToUpperCamelCase($expected, $inputString) {
-               $this->assertEquals($expected, \TYPO3\CMS\Core\Utility\GeneralUtility::underscoredToUpperCamelCase($inputString));
-       }
-
-       //////////////////////////////////
-       // Tests concerning underscoredToLowerCamelCase
-       //////////////////////////////////
-       /**
-        * Data provider for underscoredToLowerCamelCase
-        *
-        * @return array expected, input string
-        */
-       public function underscoredToLowerCamelCaseDataProvider() {
-               return array(
-                       'single word' => array('minimalvalue', 'minimalvalue'),
-                       'multiple words' => array('minimalValue', 'minimal_value')
-               );
-       }
-
-       /**
-        * @test
-        * @dataProvider underscoredToLowerCamelCaseDataProvider
-        */
-       public function underscoredToLowerCamelCase($expected, $inputString) {
-               $this->assertEquals($expected, \TYPO3\CMS\Core\Utility\GeneralUtility::underscoredToLowerCamelCase($inputString));
-       }
-
-       //////////////////////////////////
-       // Tests concerning camelCaseToLowerCaseUnderscored
-       //////////////////////////////////
-       /**
-        * Data provider for camelCaseToLowerCaseUnderscored
-        *
-        * @return array expected, input string
-        */
-       public function camelCaseToLowerCaseUnderscoredDataProvider() {
-               return array(
-                       'single word' => array('blogexample', 'blogexample'),
-                       'single word starting upper case' => array('blogexample', 'Blogexample'),
-                       'two words starting lower case' => array('minimal_value', 'minimalValue'),
-                       'two words starting upper case' => array('blog_example', 'BlogExample')
-               );
-       }
-
-       /**
-        * @test
-        * @dataProvider camelCaseToLowerCaseUnderscoredDataProvider
-        */
-       public function camelCaseToLowerCaseUnderscored($expected, $inputString) {
-               $this->assertEquals($expected, \TYPO3\CMS\Core\Utility\GeneralUtility::camelCaseToLowerCaseUnderscored($inputString));
-       }
-
-       //////////////////////////////////
-       // Tests concerning lcFirst
-       //////////////////////////////////
-       /**
-        * Data provider for lcFirst
-        *
-        * @return array expected, input string
-        */
-       public function lcfirstDataProvider() {
-               return array(
-                       'single word' => array('blogexample', 'blogexample'),
-                       'single Word starting upper case' => array('blogexample', 'Blogexample'),
-                       'two words' => array('blogExample', 'BlogExample')
-               );
-       }
-
-       /**
-        * @test
-        * @dataProvider lcfirstDataProvider
-        */
-       public function lcFirst($expected, $inputString) {
-               $this->assertEquals($expected, \TYPO3\CMS\Core\Utility\GeneralUtility::lcfirst($inputString));
-       }
-
-       //////////////////////////////////
-       // Tests concerning encodeHeader
-       //////////////////////////////////
-       /**
-        * @test
-        */
-       public function encodeHeaderEncodesWhitespacesInQuotedPrintableMailHeader() {
-               $this->assertEquals('=?utf-8?Q?We_test_whether_the_copyright_character_=C2=A9_is_encoded_correctly?=', \TYPO3\CMS\Core\Utility\GeneralUtility::encodeHeader('We test whether the copyright character © is encoded correctly', 'quoted-printable', 'utf-8'));
-       }
-
-       /**
-        * @test
-        */
-       public function encodeHeaderEncodesQuestionmarksInQuotedPrintableMailHeader() {
-               $this->assertEquals('=?utf-8?Q?Is_the_copyright_character_=C2=A9_really_encoded_correctly=3F_Really=3F?=', \TYPO3\CMS\Core\Utility\GeneralUtility::encodeHeader('Is the copyright character © really encoded correctly? Really?', 'quoted-printable', 'utf-8'));
-       }
-
-       //////////////////////////////////
-       // Tests concerning isValidUrl
-       //////////////////////////////////
-       /**
-        * Data provider for valid isValidUrl's
-        *
-        * @return array Valid ressource
-        */
-       public function validUrlValidRessourceDataProvider() {
-               return array(
-                       'http' => array('http://www.example.org/'),
-                       'http without trailing slash' => array('http://qwe'),
-                       'http directory with trailing slash' => array('http://www.example/img/dir/'),
-                       'http directory without trailing slash' => array('http://www.example/img/dir'),
-                       'http index.html' => array('http://example.com/index.html'),
-                       'http index.php' => array('http://www.example.com/index.php'),
-                       'http test.png' => array('http://www.example/img/test.png'),
-                       'http username password querystring and ancher' => array('https://user:pw@www.example.org:80/path?arg=value#fragment'),
-                       'file' => array('file:///tmp/test.c'),
-                       'file directory' => array('file://foo/bar'),
-                       'ftp directory' => array('ftp://ftp.example.com/tmp/'),
-                       'mailto' => array('mailto:foo@bar.com'),
-                       'news' => array('news:news.php.net'),
-                       'telnet' => array('telnet://192.0.2.16:80/'),
-                       'ldap' => array('ldap://[2001:db8::7]/c=GB?objectClass?one'),
-                       'http punycode domain name' => array('http://www.xn--bb-eka.at'),
-                       'http punicode subdomain' => array('http://xn--h-zfa.oebb.at'),
-                       'http domain-name umlauts' => array('http://www.öbb.at'),
-                       'http subdomain umlauts' => array('http://äh.oebb.at'),
-                       'http directory umlauts' => array('http://www.oebb.at/äöü/')
-               );
-       }
-
-       /**
-        * @test
-        * @dataProvider validUrlValidRessourceDataProvider
-        */
-       public function validURLReturnsTrueForValidRessource($url) {
-               $this->assertTrue(\TYPO3\CMS\Core\Utility\GeneralUtility::isValidUrl($url));
-       }
-
-       /**
-        * Data provider for invalid isValidUrl's
-        *
-        * @return array Invalid ressource
-        */
-       public function isValidUrlInvalidRessourceDataProvider() {
-               return array(
-                       'http missing colon' => array('http//www.example/wrong/url/'),
-                       'http missing slash' => array('http:/www.example'),
-                       'hostname only' => array('www.example.org/'),
-                       'file missing protocol specification' => array('/tmp/test.c'),
-                       'slash only' => array('/'),
-                       'string http://' => array('http://'),
-                       'string http:/' => array('http:/'),
-                       'string http:' => array('http:'),
-                       'string http' => array('http'),
-                       'empty string' => array(''),
-                       'string -1' => array('-1'),
-                       'string array()' => array('array()'),
-                       'random string' => array('qwe')
-               );
-       }
-
-       /**
-        * @test
-        * @dataProvider isValidUrlInvalidRessourceDataProvider
-        */
-       public function validURLReturnsFalseForInvalidRessoure($url) {
-               $this->assertFalse(\TYPO3\CMS\Core\Utility\GeneralUtility::isValidUrl($url));
-       }
-
-       //////////////////////////////////
-       // Tests concerning isOnCurrentHost
-       //////////////////////////////////
-       /**
-        * @test
-        */
-       public function isOnCurrentHostReturnsTrueWithCurrentHost() {
-               $testUrl = \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_REQUEST_URL');
-               $this->assertTrue(\TYPO3\CMS\Core\Utility\GeneralUtility::isOnCurrentHost($testUrl));
-       }
-
-       /**
-        * Data provider for invalid isOnCurrentHost's
-        *
-        * @return array Invalid Hosts
-        */
-       public function checkisOnCurrentHostInvalidHosts() {
-               return array(
-                       'empty string' => array(''),
-                       'arbitrary string' => array('arbitrary string'),
-                       'localhost IP' => array('127.0.0.1'),
-                       'relative path' => array('./relpath/file.txt'),
-                       'absolute path' => array('/abspath/file.txt?arg=value'),
-                       'differnt host' => array(\TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_REQUEST_HOST') . '.example.org')
-               );
-       }
-
-       ////////////////////////////////////////
-       // Tests concerning sanitizeLocalUrl
-       ////////////////////////////////////////
-       /**
-        * Data provider for valid sanitizeLocalUrl's
-        *
-        * @return array Valid url
-        */
-       public function sanitizeLocalUrlValidUrlDataProvider() {
-               $subDirectory = \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_SITE_PATH');
-               $typo3SiteUrl = \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_SITE_URL');
-               $typo3RequestHost = \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_REQUEST_HOST');
-               return array(
-                       'alt_intro.php' => array('alt_intro.php'),
-                       'alt_intro.php?foo=1&bar=2' => array('alt_intro.php?foo=1&bar=2'),
-                       $subDirectory . 'typo3/alt_intro.php' => array($subDirectory . 'typo3/alt_intro.php'),
-                       $subDirectory . 'index.php' => array($subDirectory . 'index.php'),
-                       '../index.php' => array('../index.php'),
-                       '../typo3/alt_intro.php' => array('../typo3/alt_intro.php'),
-                       '../~userDirectory/index.php' => array('../~userDirectory/index.php'),
-                       '../typo3/mod.php?var1=test-case&var2=~user' => array('../typo3/mod.php?var1=test-case&var2=~user'),
-                       PATH_site . 'typo3/alt_intro.php' => array(PATH_site . 'typo3/alt_intro.php'),
-                       $typo3SiteUrl . 'typo3/alt_intro.php' => array($typo3SiteUrl . 'typo3/alt_intro.php'),
-                       ($typo3RequestHost . $subDirectory) . '/index.php' => array(($typo3RequestHost . $subDirectory) . '/index.php')
-               );
-       }
-
-       /**
-        * @test
-        * @dataProvider sanitizeLocalUrlValidUrlDataProvider
-        */
-       public function sanitizeLocalUrlAcceptsNotEncodedValidUrls($url) {
-               $this->assertEquals($url, \TYPO3\CMS\Core\Utility\GeneralUtility::sanitizeLocalUrl($url));
-       }
-
-       /**
-        * @test
-        * @dataProvider sanitizeLocalUrlValidUrlDataProvider
-        */
-       public function sanitizeLocalUrlAcceptsEncodedValidUrls($url) {
-               $this->assertEquals(rawurlencode($url), \TYPO3\CMS\Core\Utility\GeneralUtility::sanitizeLocalUrl(rawurlencode($url)));
-       }
-
-       /**
-        * Data provider for invalid sanitizeLocalUrl's
-        *
-        * @return array Valid url
-        */
-       public function sanitizeLocalUrlInvalidDataProvider() {
-               return array(
-                       'empty string' => array(''),
-                       'http domain' => array('http://www.google.de/'),
-                       'https domain' => array('https://www.google.de/'),
-                       'relative path with XSS' => array('../typo3/whatever.php?argument=javascript:alert(0)')
-               );
-       }
-
-       /**
-        * @test
-        * @dataProvider sanitizeLocalUrlInvalidDataProvider
-        */
-       public function sanitizeLocalUrlDeniesPlainInvalidUrls($url) {
-               $this->assertEquals('', \TYPO3\CMS\Core\Utility\GeneralUtility::sanitizeLocalUrl($url));
-       }
-
-       /**
-        * @test
-        * @dataProvider sanitizeLocalUrlInvalidDataProvider
-        */
-       public function sanitizeLocalUrlDeniesEncodedInvalidUrls($url) {
-               $this->assertEquals('', \TYPO3\CMS\Core\Utility\GeneralUtility::sanitizeLocalUrl(rawurlencode($url)));
-       }
-
-       //////////////////////////////////////
-       // Tests concerning addSlashesOnArray
-       //////////////////////////////////////
-       /**
-        * @test
-        */
-       public function addSlashesOnArrayAddsSlashesRecursive() {
-               $inputArray = array(
-                       'key1' => array(
-                               'key11' => 'val\'ue1',
-                               'key12' => 'val"ue2'
-                       ),
-                       'key2' => 'val\\ue3'
-               );
-               $expectedResult = array(
-                       'key1' => array(
-                               'key11' => 'val\\\'ue1',
-                               'key12' => 'val\\"ue2'
-                       ),
-                       'key2' => 'val\\\\ue3'
-               );
-               \TYPO3\CMS\Core\Utility\GeneralUtility::addSlashesOnArray($inputArray);
-               $this->assertEquals($expectedResult, $inputArray);
-       }
-
-       //////////////////////////////////////
-       // Tests concerning addSlashesOnArray
-       //////////////////////////////////////
-       /**
-        * @test
-        */
-       public function stripSlashesOnArrayStripsSlashesRecursive() {
-               $inputArray = array(
-                       'key1' => array(
-                               'key11' => 'val\\\'ue1',
-                               'key12' => 'val\\"ue2'
-                       ),
-                       'key2' => 'val\\\\ue3'
-               );
-               $expectedResult = array(
-                       'key1' => array(
-                               'key11' => 'val\'ue1',
-                               'key12' => 'val"ue2'
-                       ),
-                       'key2' => 'val\\ue3'
-               );
-               \TYPO3\CMS\Core\Utility\GeneralUtility::stripSlashesOnArray($inputArray);
-               $this->assertEquals($expectedResult, $inputArray);
-       }
-
-       //////////////////////////////////////
-       // Tests concerning arrayDiffAssocRecursive
-       //////////////////////////////////////
-       /**
-        * @test
-        */
-       public function arrayDiffAssocRecursiveHandlesOneDimensionalArrays() {
-               $array1 = array(
-                       'key1' => 'value1',
-                       'key2' => 'value2',
-                       'key3' => 'value3'
-               );
-               $array2 = array(
-                       'key1' => 'value1',
-                       'key3' => 'value3'
-               );
-               $expectedResult = array(
-                       'key2' => 'value2'
-               );
-               $actualResult = \TYPO3\CMS\Core\Utility\GeneralUtility::arrayDiffAssocRecursive($array1, $array2);
-               $this->assertEquals($expectedResult, $actualResult);
-       }
-
-       /**
-        * @test
-        */
-       public function arrayDiffAssocRecursiveHandlesMultiDimensionalArrays() {
-               $array1 = array(
-                       'key1' => 'value1',
-                       'key2' => array(
-                               'key21' => 'value21',
-                               'key22' => 'value22',
-                               'key23' => array(
-                                       'key231' => 'value231',
-                                       'key232' => 'value232'
-                               )
-                       )
-               );
-               $array2 = array(
-                       'key1' => 'value1',
-                       'key2' => array(
-                               'key21' => 'value21',
-                               'key23' => array(
-                                       'key231' => 'value231'
-                               )
-                       )
-               );
-               $expectedResult = array(
-                       'key2' => array(
-                               'key22' => 'value22',
-                               'key23' => array(
-                                       'key232' => 'value232'
-                               )
-                       )
-               );
-               $actualResult = \TYPO3\CMS\Core\Utility\GeneralUtility::arrayDiffAssocRecursive($array1, $array2);
-               $this->assertEquals($expectedResult, $actualResult);
-       }
-
-       /**
-        * @test
-        */
-       public function arrayDiffAssocRecursiveHandlesMixedArrays() {
-               $array1 = array(
-                       'key1' => array(
-                               'key11' => 'value11',
-                               'key12' => 'value12'
-                       ),
-                       'key2' => 'value2',
-                       'key3' => 'value3'
-               );
-               $array2 = array(
-                       'key1' => 'value1',
-                       'key2' => array(
-                               'key21' => 'value21'
-                       )
-               );
-               $expectedResult = array(
-                       'key3' => 'value3'
-               );
-               $actualResult = \TYPO3\CMS\Core\Utility\GeneralUtility::arrayDiffAssocRecursive($array1, $array2);
-               $this->assertEquals($expectedResult, $actualResult);
-       }
-
-       //////////////////////////////////////
-       // Tests concerning removeDotsFromTS
-       //////////////////////////////////////
-       /**
-        * @test
-        */
-       public function removeDotsFromTypoScriptSucceedsWithDottedArray() {
-               $typoScript = array(
-                       'propertyA.' => array(
-                               'keyA.' => array(
-                                       'valueA' => 1
-                               ),
-                               'keyB' => 2
-                       ),
-                       'propertyB' => 3
-               );
-               $expectedResult = array(
-                       'propertyA' => array(
-                               'keyA' => array(
-                                       'valueA' => 1
-                               ),
-                               'keyB' => 2
-                       ),
-                       'propertyB' => 3
-               );
-               $this->assertEquals($expectedResult, \TYPO3\CMS\Core\Utility\GeneralUtility::removeDotsFromTS($typoScript));
-       }
-
-       /**
-        * @test
-        */
-       public function removeDotsFromTypoScriptOverridesSubArray() {
-               $typoScript = array(
-                       'propertyA.' => array(
-                               'keyA' => 'getsOverridden',
-                               'keyA.' => array(
-                                       'valueA' => 1
-                               ),
-                               'keyB' => 2
-                       ),
-                       'propertyB' => 3
-               );
-               $expectedResult = array(
-                       'propertyA' => array(
-                               'keyA' => array(
-                                       'valueA' => 1
-                               ),
-                               'keyB' => 2
-                       ),
-                       'propertyB' => 3
-               );
-               $this->assertEquals($expectedResult, \TYPO3\CMS\Core\Utility\GeneralUtility::removeDotsFromTS($typoScript));
-       }
-
-       /**
-        * @test
-        */
-       public function removeDotsFromTypoScriptOverridesWithScalar() {
-               $typoScript = array(
-                       'propertyA.' => array(
-                               'keyA.' => array(
-                                       'valueA' => 1
-                               ),
-                               'keyA' => 'willOverride',
-                               'keyB' => 2
-                       ),
-                       'propertyB' => 3
-               );
-               $expectedResult = array(
-                       'propertyA' => array(
-                               'keyA' => 'willOverride',
-                               'keyB' => 2
-                       ),
-                       'propertyB' => 3
-               );
-               $this->assertEquals($expectedResult, \TYPO3\CMS\Core\Utility\GeneralUtility::removeDotsFromTS($typoScript));
-       }
-
-       //////////////////////////////////////
-       // Tests concerning naturalKeySortRecursive
-       //////////////////////////////////////
-       /**
-        * @test
-        */
-       public function naturalKeySortRecursiveReturnsFalseIfInputIsNotAnArray() {
-               $testValues = array(
-                       1,
-                       'string',
-                       FALSE
-               );
-               foreach ($testValues as $testValue) {
-                       $this->assertFalse(\TYPO3\CMS\Core\Utility\GeneralUtility::naturalKeySortRecursive($testValue));
-               }
-       }
-
-       /**
-        * @test
-        */
-       public function naturalKeySortRecursiveSortsOneDimensionalArrayByNaturalOrder() {
-               $testArray = array(
-                       'bb' => 'bb',
-                       'ab' => 'ab',
-                       '123' => '123',
-                       'aaa' => 'aaa',
-                       'abc' => 'abc',
-                       '23' => '23',
-                       'ba' => 'ba',
-                       'bad' => 'bad',
-                       '2' => '2',
-                       'zap' => 'zap',
-                       '210' => '210'
-               );
-               $expectedResult = array(
-                       '2',
-                       '23',
-                       '123',
-                       '210',
-                       'aaa',
-                       'ab',
-                       'abc',
-                       'ba',
-                       'bad',
-                       'bb',
-                       'zap'
-               );
-               \TYPO3\CMS\Core\Utility\GeneralUtility::naturalKeySortRecursive($testArray);
-               $this->assertEquals($expectedResult, array_values($testArray));
-       }
-
-       /**
-        * @test
-        */
-       public function naturalKeySortRecursiveSortsMultiDimensionalArrayByNaturalOrder() {
-               $testArray = array(
-                       '2' => '2',
-                       'bb' => 'bb',
-                       'ab' => 'ab',
-                       '23' => '23',
-                       'aaa' => array(
-                               'bb' => 'bb',
-                               'ab' => 'ab',
-                               '123' => '123',
-                               'aaa' => 'aaa',
-                               '2' => '2',
-                               'abc' => 'abc',
-                               'ba' => 'ba',
-                               '23' => '23',
-                               'bad' => array(
-                                       'bb' => 'bb',
-                                       'ab' => 'ab',
-                                       '123' => '123',
-                                       'aaa' => 'aaa',
-                                       'abc' => 'abc',
-                                       '23' => '23',
-                                       'ba' => 'ba',
-                                       'bad' => 'bad',
-                                       '2' => '2',
-                                       'zap' => 'zap',
-                                       '210' => '210'
-                               ),
-                               '210' => '210',
-                               'zap' => 'zap'
-                       ),
-                       'abc' => 'abc',
-                       'ba' => 'ba',
-                       '210' => '210',
-                       'bad' => 'bad',
-                       '123' => '123',
-                       'zap' => 'zap'
-               );
-               $expectedResult = array(
-                       '2',
-                       '23',
-                       '123',
-                       '210',
-                       'aaa',
-                       'ab',
-                       'abc',
-                       'ba',
-                       'bad',
-                       'bb',
-                       'zap'
-               );
-               \TYPO3\CMS\Core\Utility\GeneralUtility::naturalKeySortRecursive($testArray);
-               $this->assertEquals($expectedResult, array_values(array_keys($testArray['aaa']['bad'])));
-               $this->assertEquals($expectedResult, array_values(array_keys($testArray['aaa'])));
-               $this->assertEquals($expectedResult, array_values(array_keys($testArray)));
-       }
-
-       //////////////////////////////////////
-       // Tests concerning get_dirs
-       //////////////////////////////////////
-       /**
-        * @test
-        */
-       public function getDirsReturnsArrayOfDirectoriesFromGivenDirectory() {
-               $path = PATH_t3lib;
-               $directories = \TYPO3\CMS\Core\Utility\GeneralUtility::get_dirs($path);
-               $this->assertInternalType(PHPUnit_Framework_Constraint_IsType::TYPE_ARRAY, $directories);
-       }
-
-       /**
-        * @test
-        */
-       public function getDirsReturnsStringErrorOnPathFailure() {
-               $path = 'foo';
-               $result = \TYPO3\CMS\Core\Utility\GeneralUtility::get_dirs($path);
-               $expectedResult = 'error';
-               $this->assertEquals($expectedResult, $result);
-       }
-
-       //////////////////////////////////
-       // Tests concerning hmac
-       //////////////////////////////////
-       /**
-        * @test
-        */
-       public function hmacReturnsHashOfProperLength() {
-               $hmac = \TYPO3\CMS\Core\Utility\GeneralUtility::hmac('message');
-               $this->assertTrue(!empty($hmac) && is_string($hmac));
-               $this->assertTrue(strlen($hmac) == 40);
-       }
-
-       /**
-        * @test
-        */
-       public function hmacReturnsEqualHashesForEqualInput() {
-               $msg0 = 'message';
-               $msg1 = 'message';
-               $this->assertEquals(\TYPO3\CMS\Core\Utility\GeneralUtility::hmac($msg0), \TYPO3\CMS\Core\Utility\GeneralUtility::hmac($msg1));
-       }
-
-       /**
-        * @test
-        */
-       public function hmacReturnsNoEqualHashesForNonEqualInput() {
-               $msg0 = 'message0';
-               $msg1 = 'message1';
-               $this->assertNotEquals(\TYPO3\CMS\Core\Utility\GeneralUtility::hmac($msg0), \TYPO3\CMS\Core\Utility\GeneralUtility::hmac($msg1));
-       }
-
-       //////////////////////////////////
-       // Tests concerning quoteJSvalue
-       //////////////////////////////////
-       /**
-        * Data provider for quoteJSvalueTest.
-        *
-        * @return array
-        */
-       public function quoteJsValueDataProvider() {
-               return array(
-                       'Immune characters are returned as is' => array(
-                               '._,',
-                               '._,'
-                       ),
-                       'Alphanumerical characters are returned as is' => array(
-                               'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789',
-                               'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'
-                       ),
-                       'Angel brackets and ampersand are encoded' => array(
-                               '<>&',
-                               '\\x3C\\x3E\\x26'
-                       ),
-                       'Quotes and slashes are encoded' => array(
-                               '"\'\\/',
-                               '\\x22\\x27\\x5C\\x2F'
-                       ),
-                       'Empty string stays empty' => array(
-                               '',
-                               ''
-                       ),
-                       'Exclamation mark and space are properly encoded' => array(
-                               'Hello World!',
-                               'Hello\\x20World\\x21'
-                       ),
-                       'Whitespaces are properly encoded' => array(
-                               ((TAB . LF) . CR) . ' ',
-                               '\\x09\\x0A\\x0D\\x20'
-                       ),
-                       'Null byte is properly encoded' => array(
-                               chr(0),
-                               '\\x00'
-                       ),
-                       'Umlauts are properly encoded' => array(
-                               'ÜüÖöÄä',
-                               '\\xDC\\xFC\\xD6\\xF6\\xC4\\xE4'
-                       )
-               );
-       }
-
-       /**
-        * @test
-        * @param string $input
-        * @param string $expected
-        * @dataProvider quoteJsValueDataProvider
-        */
-       public function quoteJsValueTest($input, $expected) {
-               $this->assertSame(('\'' . $expected) . '\'', \TYPO3\CMS\Core\Utility\GeneralUtility::quoteJSvalue($input));
-       }
-
-       //////////////////////////////////
-       // Tests concerning readLLfile
-       //////////////////////////////////
-       /**
-        * @test
-        */
-       public function readLLfileHandlesLocallangXMLOverride() {
-               $unique = uniqid('locallangXMLOverrideTest');
-               $xml = '<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-                       <T3locallang>
-                               <data type="array">
-                                       <languageKey index="default" type="array">
-                                               <label index="buttons.logout">EXIT</label>
-                                       </languageKey>
-                               </data>
-                       </T3locallang>';
-               $file = ((PATH_site . 'typo3temp/') . $unique) . '.xml';
-               \TYPO3\CMS\Core\Utility\GeneralUtility::writeFileToTypo3tempDir($file, $xml);
-               // Make sure there is no cached version of the label
-               $GLOBALS['typo3CacheManager']->getCache('t3lib_l10n')->flush();
-               // Get default value
-               $defaultLL = \TYPO3\CMS\Core\Utility\GeneralUtility::readLLfile('EXT:lang/locallang_core.xml', 'default');
-               // Clear language cache again
-               $GLOBALS['typo3CacheManager']->getCache('t3lib_l10n')->flush();
-               // Set override file
-               $GLOBALS['TYPO3_CONF_VARS']['SYS']['locallangXMLOverride']['EXT:lang/locallang_core.xml'][$unique] = $file;
-               /** @var $store \TYPO3\CMS\Core\Localization\LanguageStore */
-               $store = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Localization\\LanguageStore');
-               $store->flushData('EXT:lang/locallang_core.xml');
-               // Get override value
-               $overrideLL = \TYPO3\CMS\Core\Utility\GeneralUtility::readLLfile('EXT:lang/locallang_core.xml', 'default');
-               // Clean up again
-               unlink($file);
-               $this->assertNotEquals($overrideLL['default']['buttons.logout'][0]['target'], '');
-               $this->assertNotEquals($defaultLL['default']['buttons.logout'][0]['target'], $overrideLL['default']['buttons.logout'][0]['target']);
-               $this->assertEquals($overrideLL['default']['buttons.logout'][0]['target'], 'EXIT');
-       }
-
-       ///////////////////////////////
-       // Tests concerning _GETset()
-       ///////////////////////////////
-       /**
-        * @test
-        */
-       public function getSetWritesArrayToGetSystemVariable() {
-               $_GET = array();
-               $GLOBALS['HTTP_GET_VARS'] = array();
-               $getParameters = array('foo' => 'bar');
-               \TYPO3\CMS\Core\Utility\GeneralUtility::_GETset($getParameters);
-               $this->assertSame($getParameters, $_GET);
-       }
-
-       /**
-        * @test
-        */
-       public function getSetWritesArrayToGlobalsHttpGetVars() {
-               $_GET = array();
-               $GLOBALS['HTTP_GET_VARS'] = array();
-               $getParameters = array('foo' => 'bar');
-               \TYPO3\CMS\Core\Utility\GeneralUtility::_GETset($getParameters);
-               $this->assertSame($getParameters, $GLOBALS['HTTP_GET_VARS']);
-       }
-
-       /**
-        * @test
-        */
-       public function getSetForArrayDropsExistingValues() {
-               $_GET = array();
-               $GLOBALS['HTTP_GET_VARS'] = array();
-               \TYPO3\CMS\Core\Utility\GeneralUtility::_GETset(array('foo' => 'bar'));
-               \TYPO3\CMS\Core\Utility\GeneralUtility::_GETset(array('oneKey' => 'oneValue'));
-               $this->assertEquals(array('oneKey' => 'oneValue'), $GLOBALS['HTTP_GET_VARS']);
-       }
-
-       /**
-        * @test
-        */
-       public function getSetAssignsOneValueToOneKey() {
-               $_GET = array();
-               $GLOBALS['HTTP_GET_VARS'] = array();
-               \TYPO3\CMS\Core\Utility\GeneralUtility::_GETset('oneValue', 'oneKey');
-               $this->assertEquals('oneValue', $GLOBALS['HTTP_GET_VARS']['oneKey']);
-       }
-
-       /**
-        * @test
-        */
-       public function getSetForOneValueDoesNotDropUnrelatedValues() {
-               $_GET = array();
-               $GLOBALS['HTTP_GET_VARS'] = array();
-               \TYPO3\CMS\Core\Utility\GeneralUtility::_GETset(array('foo' => 'bar'));
-               \TYPO3\CMS\Core\Utility\GeneralUtility::_GETset('oneValue', 'oneKey');
-               $this->assertEquals(array('foo' => 'bar', 'oneKey' => 'oneValue'), $GLOBALS['HTTP_GET_VARS']);
-       }
-
-       /**
-        * @test
-        */
-       public function getSetCanAssignsAnArrayToASpecificArrayElement() {
-               $_GET = array();
-               $GLOBALS['HTTP_GET_VARS'] = array();
-               \TYPO3\CMS\Core\Utility\GeneralUtility::_GETset(array('childKey' => 'oneValue'), 'parentKey');
-               $this->assertEquals(array('parentKey' => array('childKey' => 'oneValue')), $GLOBALS['HTTP_GET_VARS']);
-       }
-
-       /**
-        * @test
-        */
-       public function getSetCanAssignAStringValueToASpecificArrayChildElement() {
-               $_GET = array();
-               $GLOBALS['HTTP_GET_VARS'] = array();
-               \TYPO3\CMS\Core\Utility\GeneralUtility::_GETset('oneValue', 'parentKey|childKey');
-               $this->assertEquals(array('parentKey' => array('childKey' => 'oneValue')), $GLOBALS['HTTP_GET_VARS']);
-       }
-
-       /**
-        * @test
-        */
-       public function getSetCanAssignAnArrayToASpecificArrayChildElement() {
-               $_GET = array();
-               $GLOBALS['HTTP_GET_VARS'] = array();
-               \TYPO3\CMS\Core\Utility\GeneralUtility::_GETset(array('key1' => 'value1', 'key2' => 'value2'), 'parentKey|childKey');
-               $this->assertEquals(array(
-                       'parentKey' => array(
-                               'childKey' => array('key1' => 'value1', 'key2' => 'value2')
-                       )
-               ), $GLOBALS['HTTP_GET_VARS']);
-       }
-
-       ///////////////////////////
-       // Tests concerning minifyJavaScript
-       ///////////////////////////
-       /**
-        * @test
-        */
-       public function minifyJavaScriptReturnsInputStringIfNoHookIsRegistered() {
-               unset($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_div.php']['minifyJavaScript']);
-               $testString = uniqid('string');
-               $this->assertSame($testString, \TYPO3\CMS\Core\Utility\GeneralUtility::minifyJavaScript($testString));
-       }
-
-       /**
-        * Create an own hook callback class, register as hook, and check
-        * if given string to compress is given to hook method
-        *
-        * @test
-        */
-       public function minifyJavaScriptCallsRegisteredHookWithInputString() {
-               $hookClassName = uniqid('tx_coretest');
-               $minifyHookMock = $this->getMock('stdClass', array('minify'), array(), $hookClassName);
-               $functionName = ('&' . $hookClassName) . '->minify';
-               $GLOBALS['T3_VAR']['callUserFunction'][$functionName] = array();
-               $GLOBALS['T3_VAR']['callUserFunction'][$functionName]['obj'] = $minifyHookMock;
-               $GLOBALS['T3_VAR']['callUserFunction'][$functionName]['method'] = 'minify';
-               $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_div.php']['minifyJavaScript'][] = $functionName;
-               $minifyHookMock->expects($this->once())->method('minify')->will($this->returnCallback(array($this, 'isMinifyJavaScriptHookCalledCallback')));
-               \TYPO3\CMS\Core\Utility\GeneralUtility::minifyJavaScript('foo');
-       }
-
-       /**
-        * Callback function used in minifyJavaScriptCallsRegisteredHookWithInputString test
-        *
-        * @param array $params
-        */
-       public function isMinifyJavaScriptHookCalledCallback(array $params) {
-               // We can not throw an exception here, because that would be caught by the
-               // minifyJavaScript method under test itself. Thus, we just die if the
-               // input string is not ok.
-               if ($params['script'] !== 'foo') {
-                       die('broken');
-               }
-       }
-
-       /**
-        * Create a hook callback, use callback to throw an exception and check
-        * if the exception is given as error parameter to the calling method.
-        *
-        * @test
-        */
-       public function minifyJavaScriptReturnsErrorStringOfHookException() {
-               $hookClassName = uniqid('tx_coretest');
-               $minifyHookMock = $this->getMock('stdClass', array('minify'), array(), $hookClassName);
-               $functionName = ('&' . $hookClassName) . '->minify';
-               $GLOBALS['T3_VAR']['callUserFunction'][$functionName] = array();
-               $GLOBALS['T3_VAR']['callUserFunction'][$functionName]['obj'] = $minifyHookMock;
-               $GLOBALS['T3_VAR']['callUserFunction'][$functionName]['method'] = 'minify';
-               $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_div.php']['minifyJavaScript'][] = $functionName;
-               $minifyHookMock->expects($this->any())->method('minify')->will($this->returnCallback(array($this, 'minifyJavaScriptErroneousCallback')));
-               $error = '';
-               \TYPO3\CMS\Core\Utility\GeneralUtility::minifyJavaScript('string to compress', $error);
-               $this->assertSame('Error minifying java script: foo', $error);
-       }
-
-       /**
-        * Check if the error message that is returned by the hook callback
-        * is logged to t3lib_div::devLog.
-        *
-        * @test
-        */
-       public function minifyJavaScriptWritesExceptionMessageToDevLog() {
-               $namespace = 'TYPO3\\CMS\\Core\\Utility';
-               $t3libDivMock = uniqid('GeneralUtility');
-               eval((((((((('namespace ' . $namespace . '; class ' . $t3libDivMock) . ' extends \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility {') . '  public static function devLog($errorMessage) {') . '    if (!($errorMessage === \'Error minifying java script: foo\')) {') . '      throw new \\UnexpectedValue(\'broken\');') . '    }') . '    throw new \\RuntimeException();') . '  }') . '}');
-               $t3libDivMock = $namespace . '\\' . $t3libDivMock;
-               $hookClassName = uniqid('tx_coretest');
-               $minifyHookMock = $this->getMock('stdClass', array('minify'), array(), $hookClassName);
-               $functionName = ('&' . $hookClassName) . '->minify';
-               $GLOBALS['T3_VAR']['callUserFunction'][$functionName] = array();
-               $GLOBALS['T3_VAR']['callUserFunction'][$functionName]['obj'] = $minifyHookMock;
-               $GLOBALS['T3_VAR']['callUserFunction'][$functionName]['method'] = 'minify';
-               $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_div.php']['minifyJavaScript'][] = $functionName;
-               $minifyHookMock->expects($this->any())->method('minify')->will($this->returnCallback(array($this, 'minifyJavaScriptErroneousCallback')));
-               $this->setExpectedException('\\RuntimeException');
-               $t3libDivMock::minifyJavaScript('string to compress');
-       }
-
-       /**
-        * Callback function used in
-        * minifyJavaScriptReturnsErrorStringOfHookException and
-        * minifyJavaScriptWritesExceptionMessageToDevLog
-        *
-        * @throws RuntimeException
-        */
-       public function minifyJavaScriptErroneousCallback() {
-               throw new RuntimeException('foo', 1344888548);
-       }
-
-       ///////////////////////////
-       // Tests concerning getUrl
-       ///////////////////////////
-       /**
-        * @test
-        */
-       public function getUrlWithAdditionalRequestHeadersProvidesHttpHeaderOnError() {
-               $url = 'http://typo3.org/i-do-not-exist-' . time();
-               $report = array();
-               \TYPO3\CMS\Core\Utility\GeneralUtility::getUrl($url, 0, array(), $report);
-               $this->assertContains('404', $report['message']);
-       }
-
-       /**
-        * @test
-        */
-       public function getUrlProvidesWithoutAdditionalRequestHeadersHttpHeaderOnError() {
-               $url = 'http://typo3.org/i-do-not-exist-' . time();
-               $report = array();
-               \TYPO3\CMS\Core\Utility\GeneralUtility::getUrl($url, 0, FALSE, $report);
-               $this->assertContains('404', $report['message'], 'Did not provide the HTTP response header when requesting a failing URL.');
-       }
-
-       ///////////////////////////////
-       // Tests concerning fixPermissions
-       ///////////////////////////////
-       /**
-        * @test
-        */
-       public function fixPermissionsSetsGroup() {
-               if (TYPO3_OS == 'WIN') {
-                       $this->markTestSkipped('fixPermissionsSetsGroup() tests not available on Windows');
-               }
-               if (!function_exists('posix_getegid')) {
-                       $this->markTestSkipped('Function posix_getegid() not available, fixPermissionsSetsGroup() tests skipped');
-               }
-               if (posix_getegid() === -1) {
-                       $this->markTestSkipped('The fixPermissionsSetsGroup() is not available on Mac OS because posix_getegid() always returns -1 on Mac OS.');
-               }
-               // Create and prepare test file
-               $filename = (PATH_site . 'typo3temp/') . uniqid('test_');
-               \TYPO3\CMS\Core\Utility\GeneralUtility::writeFileToTypo3tempDir($filename, '42');
-               $currentGroupId = posix_getegid();
-               // Set target group and run method
-               $GLOBALS['TYPO3_CONF_VARS']['BE']['createGroup'] = $currentGroupId;
-               $fixPermissionsResult = \TYPO3\CMS\Core\Utility\GeneralUtility::fixPermissions($filename);
-               clearstatcache();
-               $resultFileGroup = filegroup($filename);
-               unlink($filename);
-               $this->assertEquals($resultFileGroup, $currentGroupId);
-       }
-
-       /**
-        * @test
-        */
-       public function fixPermissionsSetsPermissionsToFile() {
-               if (TYPO3_OS == 'WIN') {
-                       $this->markTestSkipped('fixPermissions() tests not available on Windows');
-               }
-               // Create and prepare test file
-               $filename = (PATH_site . 'typo3temp/') . uniqid('test_');
-               \TYPO3\CMS\Core\Utility\GeneralUtility::writeFileToTypo3tempDir($filename, '42');
-               chmod($filename, 482);
-               // Set target permissions and run method
-               $GLOBALS['TYPO3_CONF_VARS']['BE']['fileCreateMask'] = '0660';
-               $fixPermissionsResult = \TYPO3\CMS\Core\Utility\GeneralUtility::fixPermissions($filename);
-               // Get actual permissions and clean up
-               clearstatcache();
-               $resultFilePermissions = substr(decoct(fileperms($filename)), 2);
-               unlink($filename);
-               // Test if everything was ok
-               $this->assertTrue($fixPermissionsResult);
-               $this->assertEquals($resultFilePermissions, '0660');
-       }
-
-       /**
-        * @test
-        */
-       public function fixPermissionsSetsPermissionsToHiddenFile() {
-               if (TYPO3_OS == 'WIN') {
-                       $this->markTestSkipped('fixPermissions() tests not available on Windows');
-               }
-               // Create and prepare test file
-               $filename = (PATH_site . 'typo3temp/') . uniqid('.test_');
-               \TYPO3\CMS\Core\Utility\GeneralUtility::writeFileToTypo3tempDir($filename, '42');
-               chmod($filename, 482);
-               // Set target permissions and run method
-               $GLOBALS['TYPO3_CONF_VARS']['BE']['fileCreateMask'] = '0660';
-               $fixPermissionsResult = \TYPO3\CMS\Core\Utility\GeneralUtility::fixPermissions($filename);
-               // Get actual permissions and clean up
-               clearstatcache();
-               $resultFilePermissions = substr(decoct(fileperms($filename)), 2);
-               unlink($filename);
-               // Test if everything was ok
-               $this->assertTrue($fixPermissionsResult);
-               $this->assertEquals($resultFilePermissions, '0660');
-       }
-
-       /**
-        * @test
-        */
-       public function fixPermissionsSetsPermissionsToDirectory() {
-               if (TYPO3_OS == 'WIN') {
-                       $this->markTestSkipped('fixPermissions() tests not available on Windows');
-               }
-               // Create and prepare test directory
-               $directory = (PATH_site . 'typo3temp/') . uniqid('test_');
-               \TYPO3\CMS\Core\Utility\GeneralUtility::mkdir($directory);
-               chmod($directory, 1551);
-               // Set target permissions and run method
-               $GLOBALS['TYPO3_CONF_VARS']['BE']['folderCreateMask'] = '0770';
-               $fixPermissionsResult = \TYPO3\CMS\Core\Utility\GeneralUtility::fixPermissions($directory);
-               // Get actual permissions and clean up
-               clearstatcache();
-               $resultDirectoryPermissions = substr(decoct(fileperms($directory)), 1);
-               \TYPO3\CMS\Core\Utility\GeneralUtility::rmdir($directory);
-               // Test if everything was ok
-               $this->assertTrue($fixPermissionsResult);
-               $this->assertEquals($resultDirectoryPermissions, '0770');
-       }
-
-       /**
-        * @test
-        */
-       public function fixPermissionsSetsPermissionsToDirectoryWithTrailingSlash() {
-               if (TYPO3_OS == 'WIN') {
-                       $this->markTestSkipped('fixPermissions() tests not available on Windows');
-               }
-               // Create and prepare test directory
-               $directory = (PATH_site . 'typo3temp/') . uniqid('test_');
-               \TYPO3\CMS\Core\Utility\GeneralUtility::mkdir($directory);
-               chmod($directory, 1551);
-               // Set target permissions and run method
-               $GLOBALS['TYPO3_CONF_VARS']['BE']['folderCreateMask'] = '0770';
-               $fixPermissionsResult = \TYPO3\CMS\Core\Utility\GeneralUtility::fixPermissions($directory . '/');
-               // Get actual permissions and clean up
-               clearstatcache();
-               $resultDirectoryPermissions = substr(decoct(fileperms($directory)), 1);
-               \TYPO3\CMS\Core\Utility\GeneralUtility::rmdir($directory);
-               // Test if everything was ok
-               $this->assertTrue($fixPermissionsResult);
-               $this->assertEquals($resultDirectoryPermissions, '0770');
-       }
-
-       /**
-        * @test
-        */
-       public function fixPermissionsSetsPermissionsToHiddenDirectory() {
-               if (TYPO3_OS == 'WIN') {
-                       $this->markTestSkipped('fixPermissions() tests not available on Windows');
-               }
-               // Create and prepare test directory
-               $directory = (PATH_site . 'typo3temp/') . uniqid('.test_');
-               \TYPO3\CMS\Core\Utility\GeneralUtility::mkdir($directory);
-               chmod($directory, 1551);
-               // Set target permissions and run method
-               $GLOBALS['TYPO3_CONF_VARS']['BE']['folderCreateMask'] = '0770';
-               $fixPermissionsResult = \TYPO3\CMS\Core\Utility\GeneralUtility::fixPermissions($directory);
-               // Get actual permissions and clean up
-               clearstatcache();
-               $resultDirectoryPermissions = substr(decoct(fileperms($directory)), 1);
-               \TYPO3\CMS\Core\Utility\GeneralUtility::rmdir($directory);
-               // Test if everything was ok
-               $this->assertTrue($fixPermissionsResult);
-               $this->assertEquals($resultDirectoryPermissions, '0770');
-       }
-
-       /**
-        * @test
-        */
-       public function fixPermissionsCorrectlySetsPermissionsRecursive() {
-               if (TYPO3_OS == 'WIN') {
-                       $this->markTestSkipped('fixPermissions() tests not available on Windows');
-               }
-               // Create and prepare test directory and file structure
-               $baseDirectory = (PATH_site . 'typo3temp/') . uniqid('test_');
-               \TYPO3\CMS\Core\Utility\GeneralUtility::mkdir($baseDirectory);
-               chmod($baseDirectory, 1751);
-               \TYPO3\CMS\Core\Utility\GeneralUtility::writeFileToTypo3tempDir($baseDirectory . '/file', '42');
-               chmod($baseDirectory . '/file', 482);
-               \TYPO3\CMS\Core\Utility\GeneralUtility::mkdir($baseDirectory . '/foo');
-               chmod($baseDirectory . '/foo', 1751);
-               \TYPO3\CMS\Core\Utility\GeneralUtility::writeFileToTypo3tempDir($baseDirectory . '/foo/file', '42');
-               chmod($baseDirectory . '/foo/file', 482);
-               \TYPO3\CMS\Core\Utility\GeneralUtility::mkdir($baseDirectory . '/.bar');
-               chmod($baseDirectory . '/.bar', 1751);
-               // Use this if writeFileToTypo3tempDir is fixed to create hidden files in subdirectories
-               // t3lib_div::writeFileToTypo3tempDir($baseDirectory . '/.bar/.file', '42');
-               // t3lib_div::writeFileToTypo3tempDir($baseDirectory . '/.bar/..file2', '42');
-               touch($baseDirectory . '/.bar/.file', '42');
-               chmod($baseDirectory . '/.bar/.file', 482);
-               touch($baseDirectory . '/.bar/..file2', '42');
-               chmod($baseDirectory . '/.bar/..file2', 482);
-               // Set target permissions and run method
-               $GLOBALS['TYPO3_CONF_VARS']['BE']['fileCreateMask'] = '0660';
-               $GLOBALS['TYPO3_CONF_VARS']['BE']['folderCreateMask'] = '0770';
-               $fixPermissionsResult = \TYPO3\CMS\Core\Utility\GeneralUtility::fixPermissions($baseDirectory, TRUE);
-               // Get actual permissions
-               clearstatcache();
-               $resultBaseDirectoryPermissions = substr(decoct(fileperms($baseDirectory)), 1);
-               $resultBaseFilePermissions = substr(decoct(fileperms($baseDirectory . '/file')), 2);
-               $resultFooDirectoryPermissions = substr(decoct(fileperms($baseDirectory . '/foo')), 1);
-               $resultFooFilePermissions = substr(decoct(fileperms($baseDirectory . '/foo/file')), 2);
-               $resultBarDirectoryPermissions = substr(decoct(fileperms($baseDirectory . '/.bar')), 1);
-               $resultBarFilePermissions = substr(decoct(fileperms($baseDirectory . '/.bar/.file')), 2);
-               $resultBarFile2Permissions = substr(decoct(fileperms($baseDirectory . '/.bar/..file2')), 2);
-               // Clean up
-               unlink($baseDirectory . '/file');
-               unlink($baseDirectory . '/foo/file');
-               unlink($baseDirectory . '/.bar/.file');
-               unlink($baseDirectory . '/.bar/..file2');
-               \TYPO3\CMS\Core\Utility\GeneralUtility::rmdir($baseDirectory . '/foo');
-               \TYPO3\CMS\Core\Utility\GeneralUtility::rmdir($baseDirectory . '/.bar');
-               \TYPO3\CMS\Core\Utility\GeneralUtility::rmdir($baseDirectory);
-               // Test if everything was ok
-               $this->assertTrue($fixPermissionsResult);
-               $this->assertEquals($resultBaseDirectoryPermissions, '0770');
-               $this->assertEquals($resultBaseFilePermissions, '0660');
-               $this->assertEquals($resultFooDirectoryPermissions, '0770');
-               $this->assertEquals($resultFooFilePermissions, '0660');
-               $this->assertEquals($resultBarDirectoryPermissions, '0770');
-               $this->assertEquals($resultBarFilePermissions, '0660');
-               $this->assertEquals($resultBarFile2Permissions, '0660');
-       }
-
-       /**
-        * @test
-        */
-       public function fixPermissionsDoesNotSetPermissionsToNotAllowedPath() {
-               if (TYPO3_OS == 'WIN') {
-                       $this->markTestSkipped('fixPermissions() tests not available on Windows');
-               }
-               // Create and prepare test file
-               $filename = (PATH_site . 'typo3temp/../typo3temp/') . uniqid('test_');
-               touch($filename);
-               chmod($filename, 482);
-               // Set target permissions and run method
-               $GLOBALS['TYPO3_CONF_VARS']['BE']['fileCreateMask'] = '0660';
-               $fixPermissionsResult = \TYPO3\CMS\Core\Utility\GeneralUtility::fixPermissions($filename);
-               // Get actual permissions and clean up
-               clearstatcache();
-               $resultFilePermissions = substr(decoct(fileperms($filename)), 2);
-               unlink($filename);
-               // Test if everything was ok
-               $this->assertFalse($fixPermissionsResult);
-       }
-
-       /**
-        * @test
-        */
-       public function fixPermissionsSetsPermissionsWithRelativeFileReference() {
-               if (TYPO3_OS == 'WIN') {
-                       $this->markTestSkipped('fixPermissions() tests not available on Windows');
-               }
-               $filename = 'typo3temp/' . uniqid('test_');
-               \TYPO3\CMS\Core\Utility\GeneralUtility::writeFileToTypo3tempDir(PATH_site . $filename, '42');
-               chmod(PATH_site . $filename, 482);
-               // Set target permissions and run method
-               $GLOBALS['TYPO3_CONF_VARS']['BE']['fileCreateMask'] = '0660';
-               $fixPermissionsResult = \TYPO3\CMS\Core\Utility\GeneralUtility::fixPermissions($filename);
-               // Get actual permissions and clean up
-               clearstatcache();
-               $resultFilePermissions = substr(decoct(fileperms(PATH_site . $filename)), 2);
-               unlink(PATH_site . $filename);
-               // Test if everything was ok
-               $this->assertTrue($fixPermissionsResult);
-               $this->assertEquals($resultFilePermissions, '0660');
-       }
-
-       ///////////////////////////////
-       // Tests concerning mkdir
-       ///////////////////////////////
-       /**
-        * @test
-        */
-       public function mkdirCreatesDirectory() {
-               $directory = (PATH_site . 'typo3temp/') . uniqid('test_');
-               $mkdirResult = \TYPO3\CMS\Core\Utility\GeneralUtility::mkdir($directory);
-               clearstatcache();
-               $directoryCreated = is_dir($directory);
-               @rmdir($directory);
-               $this->assertTrue($mkdirResult);
-               $this->assertTrue($directoryCreated);
-       }
-
-       /**
-        * @test
-        */
-       public function mkdirCreatesHiddenDirectory() {
-               $directory = (PATH_site . 'typo3temp/') . uniqid('.test_');
-               $mkdirResult = \TYPO3\CMS\Core\Utility\GeneralUtility::mkdir($directory);
-               clearstatcache();
-               $directoryCreated = is_dir($directory);
-               @rmdir($directory);
-               $this->assertTrue($mkdirResult);
-               $this->assertTrue($directoryCreated);
-       }
-
-       /**
-        * @test
-        */
-       public function mkdirCreatesDirectoryWithTrailingSlash() {
-               $directory = ((PATH_site . 'typo3temp/') . uniqid('test_')) . '/';
-               $mkdirResult = \TYPO3\CMS\Core\Utility\GeneralUtility::mkdir($directory);
-               clearstatcache();
-               $directoryCreated = is_dir($directory);
-               @rmdir($directory);
-               $this->assertTrue($mkdirResult);
-               $this->assertTrue($directoryCreated);
-       }
-
-       /**
-        * @test
-        */
-       public function mkdirSetsPermissionsOfCreatedDirectory() {
-               if (TYPO3_OS == 'WIN') {
-                       $this->markTestSkipped('mkdirSetsPermissionsOfCreatedDirectory() test not available on Windows');
-               }
-               $directory = (PATH_site . 'typo3temp/') . uniqid('test_');
-               $oldUmask = umask(19);
-               $GLOBALS['TYPO3_CONF_VARS']['BE']['folderCreateMask'] = '0772';
-               \TYPO3\CMS\Core\Utility\GeneralUtility::mkdir($directory);
-               clearstatcache();
-               $resultDirectoryPermissions = substr(decoct(fileperms($directory)), 1);
-               umask($oldUmask);
-               rmdir($directory);
-               $this->assertEquals($resultDirectoryPermissions, '0772');
-       }
-
-       /**
-        * @test
-        */
-       public function mkdirSetsGroupOwnershipOfCreatedDirectory() {
-               if (!function_exists('posix_getegid')) {
-                       $this->markTestSkipped('Function posix_getegid() not available, mkdirSetsGroupOwnershipOfCreatedDirectory() tests skipped');
-               }
-               if (posix_getegid() === -1) {
-                       $this->markTestSkipped('The mkdirSetsGroupOwnershipOfCreatedDirectory() is not available on Mac OS because posix_getegid() always returns -1 on Mac OS.');
-               }
-               $swapGroup = $this->checkGroups(__FUNCTION__);
-               if ($swapGroup !== FALSE) {
-                       $GLOBALS['TYPO3_CONF_VARS']['BE']['createGroup'] = $swapGroup;
-                       $directory = uniqid('mkdirtest_');
-                       \TYPO3\CMS\Core\Utility\GeneralUtility::mkdir((PATH_site . 'typo3temp/') . $directory);
-                       clearstatcache();
-                       $resultDirectoryGroupInfo = posix_getgrgid(filegroup((PATH_site . 'typo3temp/') . $directory));
-                       $resultDirectoryGroup = $resultDirectoryGroupInfo['name'];
-                       @rmdir(((PATH_site . 'typo3temp/') . $directory));
-                       $this->assertEquals($resultDirectoryGroup, $swapGroup);
-               }
-       }
-
-       ///////////////////////////////
-       // Helper function for filesystem ownership tests
-       ///////////////////////////////
-       /**
-        * Check if test on filesystem group ownership can be done in this environment
-        * If so, return second group of webserver user
-        *
-        * @param string calling method name
-        * @return mixed FALSE if test cannot be run, string name of the second group of webserver user
-        */
-       private function checkGroups($methodName) {
-               if (TYPO3_OS == 'WIN') {
-                       $this->markTestSkipped($methodName . '() test not available on Windows.');
-                       return FALSE;
-               }
-               if (!function_exists('posix_getgroups')) {
-                       $this->markTestSkipped(('Function posix_getgroups() not available, ' . $methodName) . '() tests skipped');
-               }
-               $groups = posix_getgroups();
-               if (count($groups) <= 1) {
-                       $this->markTestSkipped($methodName . '() test cannot be done when the web server user is only member of 1 group.');
-                       return FALSE;
-               }
-               $groupInfo = posix_getgrgid($groups[1]);
-               return $groupInfo['name'];
-       }
-
-       ///////////////////////////////
-       // Tests concerning mkdir_deep
-       ///////////////////////////////
-       /**
-        * @test
-        */
-       public function mkdirDeepCreatesDirectory() {
-               $directory = 'typo3temp/' . uniqid('test_');
-               \TYPO3\CMS\Core\Utility\GeneralUtility::mkdir_deep(PATH_site, $directory);
-               $isDirectoryCreated = is_dir(PATH_site . $directory);
-               rmdir(PATH_site . $directory);
-               $this->assertTrue($isDirectoryCreated);
-       }
-
-       /**
-        * @test
-        */
-       public function mkdirDeepCreatesSubdirectoriesRecursive() {
-               $directory = 'typo3temp/' . uniqid('test_');
-               $subDirectory = $directory . '/foo';
-               \TYPO3\CMS\Core\Utility\GeneralUtility::mkdir_deep(PATH_site, $subDirectory);
-               $isDirectoryCreated = is_dir(PATH_site . $subDirectory);
-               rmdir(PATH_site . $subDirectory);
-               rmdir(PATH_site . $directory);
-               $this->assertTrue($isDirectoryCreated);
-       }
-
-       /**
-        * @test
-        */
-       public function mkdirDeepFixesPermissionsOfCreatedDirectory() {
-               if (TYPO3_OS == 'WIN') {
-                       $this->markTestSkipped('mkdirDeepFixesPermissionsOfCreatedDirectory() test not available on Windows.');
-               }
-               $directory = uniqid('mkdirdeeptest_');
-               $oldUmask = umask(19);
-               $GLOBALS['TYPO3_CONF_VARS']['BE']['folderCreateMask'] = '0777';
-               \TYPO3\CMS\Core\Utility\GeneralUtility::mkdir_deep(PATH_site . 'typo3temp/', $directory);
-               clearstatcache();
-               $resultDirectoryPermissions = substr(decoct(fileperms((PATH_site . 'typo3temp/') . $directory)), -3, 3);
-               @rmdir(((PATH_site . 'typo3temp/') . $directory));
-               umask($oldUmask);
-               $this->assertEquals($resultDirectoryPermissions, '777');
-       }
-
-       /**
-        * @test
-        */
-       public function mkdirDeepFixesPermissionsOnNewParentDirectory() {
-               if (TYPO3_OS == 'WIN') {
-                       $this->markTestSkipped('mkdirDeepFixesPermissionsOnNewParentDirectory() test not available on Windows.');
-               }
-               $directory = uniqid('mkdirdeeptest_');
-               $subDirectory = $directory . '/bar';
-               $GLOBALS['TYPO3_CONF_VARS']['BE']['folderCreateMask'] = '0777';
-               $oldUmask = umask(19);
-               \TYPO3\CMS\Core\Utility\GeneralUtility::mkdir_deep(PATH_site . 'typo3temp/', $subDirectory);
-               clearstatcache();
-               $resultDirectoryPermissions = substr(decoct(fileperms((PATH_site . 'typo3temp/') . $directory)), -3, 3);
-               @rmdir(((PATH_site . 'typo3temp/') . $subDirectory));
-               @rmdir(((PATH_site . 'typo3temp/') . $directory));
-               umask($oldUmask);
-               $this->assertEquals($resultDirectoryPermissions, '777');
-       }
-
-       /**
-        * @test
-        */
-       public function mkdirDeepDoesNotChangePermissionsOfExistingSubDirectories() {
-               if (TYPO3_OS == 'WIN') {
-                       $this->markTestSkipped('mkdirDeepDoesNotChangePermissionsOfExistingSubDirectories() test not available on Windows.');
-               }
-               $baseDirectory = PATH_site . 'typo3temp/';
-               $existingDirectory = uniqid('test_existing_') . '/';
-               $newSubDirectory = uniqid('test_new_');
-               @mkdir(($baseDirectory . $existingDirectory));
-               chmod($baseDirectory . $existingDirectory, 482);
-               \TYPO3\CMS\Core\Utility\GeneralUtility::mkdir_deep($baseDirectory, $existingDirectory . $newSubDirectory);
-               $resultExistingDirectoryPermissions = substr(decoct(fileperms($baseDirectory . $existingDirectory)), 2);
-               @rmdir($baseDirectory, ($existingDirectory . $newSubDirectory));
-               @rmdir($baseDirectory, $existingDirectory);
-               $this->assertEquals($resultExistingDirectoryPermissions, '0742');
-       }
-
-       /**
-        * @test
-        */
-       public function mkdirDeepSetsGroupOwnershipOfCreatedDirectory() {
-               $swapGroup = $this->checkGroups(__FUNCTION__);
-               if ($swapGroup !== FALSE) {
-                       $GLOBALS['TYPO3_CONF_VARS']['BE']['createGroup'] = $swapGroup;
-                       $directory = uniqid('mkdirdeeptest_');
-                       \TYPO3\CMS\Core\Utility\GeneralUtility::mkdir_deep(PATH_site . 'typo3temp/', $directory);
-                       clearstatcache();
-                       $resultDirectoryGroupInfo = posix_getgrgid(filegroup((PATH_site . 'typo3temp/') . $directory));
-                       $resultDirectoryGroup = $resultDirectoryGroupInfo['name'];
-                       @rmdir(((PATH_site . 'typo3temp/') . $directory));
-                       $this->assertEquals($resultDirectoryGroup, $swapGroup);
-               }
-       }
-
-       /**
-        * @test
-        */
-       public function mkdirDeepSetsGroupOwnershipOfCreatedParentDirectory() {
-               $swapGroup = $this->checkGroups(__FUNCTION__);
-               if ($swapGroup !== FALSE) {
-                       $GLOBALS['TYPO3_CONF_VARS']['BE']['createGroup'] = $swapGroup;
-                       $directory = uniqid('mkdirdeeptest_');
-                       $subDirectory = $directory . '/bar';
-                       \TYPO3\CMS\Core\Utility\GeneralUtility::mkdir_deep(PATH_site . 'typo3temp/', $subDirectory);
-                       clearstatcache();
-                       $resultDirectoryGroupInfo = posix_getgrgid(filegroup((PATH_site . 'typo3temp/') . $directory));
-                       $resultDirectoryGroup = $resultDirectoryGroupInfo['name'];
-                       @rmdir(((PATH_site . 'typo3temp/') . $subDirectory));
-                       @rmdir(((PATH_site . 'typo3temp/') . $directory));
-                       $this->assertEquals($resultDirectoryGroup, $swapGroup);
-               }
-       }
-
-       /**
-        * @test
-        */
-       public function mkdirDeepSetsGroupOwnershipOnNewSubDirectory() {
-               $swapGroup = $this->checkGroups(__FUNCTION__);
-               if ($swapGroup !== FALSE) {
-                       $GLOBALS['TYPO3_CONF_VARS']['BE']['createGroup'] = $swapGroup;
-                       $directory = uniqid('mkdirdeeptest_');
-                       $subDirectory = $directory . '/bar';
-                       \TYPO3\CMS\Core\Utility\GeneralUtility::mkdir_deep(PATH_site . 'typo3temp/', $subDirectory);
-                       clearstatcache();
-                       $resultDirectoryGroupInfo = posix_getgrgid(filegroup((PATH_site . 'typo3temp/') . $subDirectory));
-                       $resultDirectoryGroup = $resultDirectoryGroupInfo['name'];
-                       @rmdir(((PATH_site . 'typo3temp/') . $subDirectory));
-                       @rmdir(((PATH_site . 'typo3temp/') . $directory));
-                       $this->assertEquals($resultDirectoryGroup, $swapGroup);
-               }
-       }
-
-       /**
-        * @test
-        */
-       public function mkdirDeepCreatesDirectoryInVfsStream() {
-               if (!class_exists('\\vfsStreamWrapper')) {
-                       $this->markTestSkipped('mkdirDeepCreatesDirectoryInVfsStream() test not available with this phpunit version.');
-               }
-               \vfsStreamWrapper::register();
-               $baseDirectory = uniqid('test_');
-               \vfsStreamWrapper::setRoot(new \vfsStreamDirectory($baseDirectory));
-               \TYPO3\CMS\Core\Utility\GeneralUtility::mkdir_deep(('vfs://' . $baseDirectory) . '/', 'sub');
-               $this->assertTrue(is_dir(('vfs://' . $baseDirectory) . '/sub'));
-       }
-
-       /**
-        * @test
-        * @expectedException \RuntimeException
-        */
-       public function mkdirDeepThrowsExceptionIfDirectoryCreationFails() {
-               \TYPO3\CMS\Core\Utility\GeneralUtility::mkdir_deep('http://localhost');
-       }
-
-       /**
-        * @test
-        * @expectedException \InvalidArgumentException
-        */
-       public function mkdirDeepThrowsExceptionIfBaseDirectoryIsNotOfTypeString() {
-               \TYPO3\CMS\Core\Utility\GeneralUtility::mkdir_deep(array());
-       }
-
-       /**
-        * @test
-        * @expectedException \InvalidArgumentException
-        */
-       public function mkdirDeepThrowsExceptionIfDeepDirectoryIsNotOfTypeString() {
-               \TYPO3\CMS\Core\Utility\GeneralUtility::mkdir_deep(PATH_site . 'typo3temp/foo', array());
-       }
-
-       ///////////////////////////////
-       // Tests concerning unQuoteFilenames
-       ///////////////////////////////
-       /**
-        * Data provider for ImageMagick shell commands
-        *
-        * @see         explodeAndUnquoteImageMagickCommands
-        */
-       public function imageMagickCommandsDataProvider() {
-               return array(
-                       // Some theoretical tests first
-                       array(
-                               'aa bb "cc" "dd"',
-                               array('aa', 'bb', '"cc"', '"dd"'),
-                               array('aa', 'bb', 'cc', 'dd')
-                       ),
-                       array(
-                               'aa bb "cc dd"',
-                               array('aa', 'bb', '"cc dd"'),
-                               array('aa', 'bb', 'cc dd')
-                       ),
-                       array(
-                               '\'aa bb\' "cc dd"',
-                               array('\'aa bb\'', '"cc dd"'),
-                               array('aa bb', 'cc dd')
-                       ),
-                       array(
-                               '\'aa bb\' cc "dd"',
-                               array('\'aa bb\'', 'cc', '"dd"'),
-                               array('aa bb', 'cc', 'dd')
-                       ),
-                       // Now test against some real world examples
-                       array(
-                               '/opt/local/bin/gm.exe convert +profile \'*\' -geometry 170x136!  -negate "C:/Users/Someuser.Domain/Documents/Htdocs/typo3temp/temp/61401f5c16c63d58e1d92e8a2449f2fe_maskNT.gif[0]" "C:/Users/Someuser.Domain/Documents/Htdocs/typo3temp/temp/61401f5c16c63d58e1d92e8a2449f2fe_maskNT.gif"',
-                               array(
-                                       '/opt/local/bin/gm.exe',
-                                       'convert',
-                                       '+profile',
-                                       '\'*\'',
-                                       '-geometry',
-                                       '170x136!',
-                                       '-negate',
-                                       '"C:/Users/Someuser.Domain/Documents/Htdocs/typo3temp/temp/61401f5c16c63d58e1d92e8a2449f2fe_maskNT.gif[0]"',
-                                       '"C:/Users/Someuser.Domain/Documents/Htdocs/typo3temp/temp/61401f5c16c63d58e1d92e8a2449f2fe_maskNT.gif"'
-                               ),
-                               array(
-                                       '/opt/local/bin/gm.exe',
-                                       'convert',
-                                       '+profile',
-                                       '*',
-                                       '-geometry',
-                                       '170x136!',
-                                       '-negate',
-                                       'C:/Users/Someuser.Domain/Documents/Htdocs/typo3temp/temp/61401f5c16c63d58e1d92e8a2449f2fe_maskNT.gif[0]',
-                                       'C:/Users/Someuser.Domain/Documents/Htdocs/typo3temp/temp/61401f5c16c63d58e1d92e8a2449f2fe_maskNT.gif'
-                               )
-                       ),
-                       array(
-                               'C:/opt/local/bin/gm.exe convert +profile \'*\' -geometry 170x136!  -negate "C:/Program Files/Apache2/htdocs/typo3temp/temp/61401f5c16c63d58e1d92e8a2449f2fe_maskNT.gif[0]" "C:/Program Files/Apache2/htdocs/typo3temp/temp/61401f5c16c63d58e1d92e8a2449f2fe_maskNT.gif"',
-                               array(
-                                       'C:/opt/local/bin/gm.exe',
-                                       'convert',
-                                       '+profile',
-                                       '\'*\'',
-                                       '-geometry',
-                                       '170x136!',
-                                       '-negate',
-                                       '"C:/Program Files/Apache2/htdocs/typo3temp/temp/61401f5c16c63d58e1d92e8a2449f2fe_maskNT.gif[0]"',
-                                       '"C:/Program Files/Apache2/htdocs/typo3temp/temp/61401f5c16c63d58e1d92e8a2449f2fe_maskNT.gif"'
-                               ),
-                               array(
-                                       'C:/opt/local/bin/gm.exe',
-                                       'convert',
-                                       '+profile',
-                                       '*',
-                                       '-geometry',
-                                       '170x136!',
-                                       '-negate',
-                                       'C:/Program Files/Apache2/htdocs/typo3temp/temp/61401f5c16c63d58e1d92e8a2449f2fe_maskNT.gif[0]',
-                                       'C:/Program Files/Apache2/htdocs/typo3temp/temp/61401f5c16c63d58e1d92e8a2449f2fe_maskNT.gif'
-                               )
-                       ),
-                       array(
-                               '/usr/bin/gm convert +profile \'*\' -geometry 170x136!  -negate "/Shared Items/Data/Projects/typo3temp/temp/61401f5c16c63d58e1d92e8a2449f2fe_maskNT.gif[0]" "/Shared Items/Data/Projects/typo3temp/temp/61401f5c16c63d58e1d92e8a2449f2fe_maskNT.gif"',
-                               array(
-                                       '/usr/bin/gm',
-                                       'convert',
-                                       '+profile',
-                                       '\'*\'',
-                                       '-geometry',
-                                       '170x136!',
-                                       '-negate',
-                                       '"/Shared Items/Data/Projects/typo3temp/temp/61401f5c16c63d58e1d92e8a2449f2fe_maskNT.gif[0]"',
-                                       '"/Shared Items/Data/Projects/typo3temp/temp/61401f5c16c63d58e1d92e8a2449f2fe_maskNT.gif"'
-                               ),
-                               array(
-                                       '/usr/bin/gm',
-                                       'convert',
-                                       '+profile',
-                                       '*',
-                                       '-geometry',
-                                       '170x136!',
-                                       '-negate',
-                                       '/Shared Items/Data/Projects/typo3temp/temp/61401f5c16c63d58e1d92e8a2449f2fe_maskNT.gif[0]',
-                                       '/Shared Items/Data/Projects/typo3temp/temp/61401f5c16c63d58e1d92e8a2449f2fe_maskNT.gif'
-                               )
-                       ),
-                       array(
-                               '/usr/bin/gm convert +profile \'*\' -geometry 170x136!  -negate "/Network/Servers/server01.internal/Projects/typo3temp/temp/61401f5c16c63d58e1d92e8a2449f2fe_maskNT.gif[0]" "/Network/Servers/server01.internal/Projects/typo3temp/temp/61401f5c16c63d58e1d92e8a2449f2fe_maskNT.gif"',
-                               array(
-                                       '/usr/bin/gm',
-                                       'convert',
-                                       '+profile',
-                                       '\'*\'',
-                                       '-geometry',
-                                       '170x136!',
-                                       '-negate',
-                                       '"/Network/Servers/server01.internal/Projects/typo3temp/temp/61401f5c16c63d58e1d92e8a2449f2fe_maskNT.gif[0]"',
-                                       '"/Network/Servers/server01.internal/Projects/typo3temp/temp/61401f5c16c63d58e1d92e8a2449f2fe_maskNT.gif"'
-                               ),
-                               array(
-                                       '/usr/bin/gm',
-                                       'convert',
-                                       '+profile',
-                                       '*',
-                                       '-geometry',
-                                       '170x136!',
-                                       '-negate',
-                                       '/Network/Servers/server01.internal/Projects/typo3temp/temp/61401f5c16c63d58e1d92e8a2449f2fe_maskNT.gif[0]',
-                                       '/Network/Servers/server01.internal/Projects/typo3temp/temp/61401f5c16c63d58e1d92e8a2449f2fe_maskNT.gif'
-                               )
-                       ),
-                       array(
-                               '/usr/bin/gm convert +profile \'*\' -geometry 170x136!  -negate \'/Network/Servers/server01.internal/Projects/typo3temp/temp/61401f5c16c63d58e1d92e8a2449f2fe_maskNT.gif[0]\' \'/Network/Servers/server01.internal/Projects/typo3temp/temp/61401f5c16c63d58e1d92e8a2449f2fe_maskNT.gif\'',
-                               array(
-                                       '/usr/bin/gm',
-                                       'convert',
-                                       '+profile',
-                                       '\'*\'',
-                                       '-geometry',
-                                       '170x136!',
-                                       '-negate',
-                                       '\'/Network/Servers/server01.internal/Projects/typo3temp/temp/61401f5c16c63d58e1d92e8a2449f2fe_maskNT.gif[0]\'',
-                                       '\'/Network/Servers/server01.internal/Projects/typo3temp/temp/61401f5c16c63d58e1d92e8a2449f2fe_maskNT.gif\''
-                               ),
-                               array(
-                                       '/usr/bin/gm',
-                                       'convert',
-                                       '+profile',
-                                       '*',
-                                       '-geometry',
-                                       '170x136!',
-                                       '-negate',
-                                       '/Network/Servers/server01.internal/Projects/typo3temp/temp/61401f5c16c63d58e1d92e8a2449f2fe_maskNT.gif[0]',
-                                       '/Network/Servers/server01.internal/Projects/typo3temp/temp/61401f5c16c63d58e1d92e8a2449f2fe_maskNT.gif'
-                               )
-                       )
-               );
-       }
-
-       /**
-        * Tests if the commands are exploded and unquoted correctly
-        *
-        * @dataProvider        imageMagickCommandsDataProvider
-        * @test
-        */
-       public function explodeAndUnquoteImageMagickCommands($source, $expectedQuoted, $expectedUnquoted) {
-               $actualQuoted = \TYPO3\CMS\Core\Utility\GeneralUtility::unQuoteFilenames($source);
-               $acutalUnquoted = \TYPO3\CMS\Core\Utility\GeneralUtility::unQuoteFilenames($source, TRUE);
-               $this->assertEquals($expectedQuoted, $actualQuoted, 'The exploded command does not match the expected');
-               $this->assertEquals($expectedUnquoted, $acutalUnquoted, 'The exploded and unquoted command does not match the expected');
-       }
-
-       ///////////////////////////////
-       // Tests concerning split_fileref
-       ///////////////////////////////
-       /**
-        * @test
-        */
-       public function splitFileRefReturnsFileTypeNotForFolders() {
-               $directoryName = uniqid('test_') . '.com';
-               $directoryPath = PATH_site . 'typo3temp/';
-               $directory = $directoryPath . $directoryName;
-               mkdir($directory, octdec($GLOBALS['TYPO3_CONF_VARS']['BE']['folderCreateMask']));
-               $fileInfo = \TYPO3\CMS\Core\Utility\GeneralUtility::split_fileref($directory);
-               $directoryCreated = is_dir($directory);
-               rmdir($directory);
-               $this->assertTrue($directoryCreated);
-               $this->assertInternalType(PHPUnit_Framework_Constraint_IsType::TYPE_ARRAY, $fileInfo);
-               $this->assertEquals($directoryPath, $fileInfo['path']);
-               $this->assertEquals($directoryName, $fileInfo['file']);
-               $this->assertEquals($directoryName, $fileInfo['filebody']);
-               $this->assertEquals('', $fileInfo['fileext']);
-               $this->assertArrayNotHasKey('realFileext', $fileInfo);
-       }
-
-       /**
-        * @test
-        */
-       public function splitFileRefReturnsFileTypeForFilesWithoutPathSite() {
-               $testFile = 'fileadmin/media/someFile.png';
-               $fileInfo = \TYPO3\CMS\Core\Utility\GeneralUtility::split_fileref($testFile);
-               $this->assertInternalType(PHPUnit_Framework_Constraint_IsType::TYPE_ARRAY, $fileInfo);
-               $this->assertEquals('fileadmin/media/', $fileInfo['path']);
-               $this->assertEquals('someFile.png', $fileInfo['file']);
-               $this->assertEquals('someFile', $fileInfo['filebody']);
-               $this->assertEquals('png', $fileInfo['fileext']);
-       }
-
-       /////////////////////////////
-       // Tests concerning dirname
-       /////////////////////////////
-       /**
-        * @see dirnameWithDataProvider
-        * @return array<array>
-        */
-       public function dirnameDataProvider() {
-               return array(
-                       'absolute path with multiple part and file' => array('/dir1/dir2/script.php', '/dir1/dir2'),
-                       'absolute path with one part' => array('/dir1/', '/dir1'),
-                       'absolute path to file without extension' => array('/dir1/something', '/dir1'),
-                       'relative path with one part and file' => array('dir1/script.php', 'dir1'),
-                       'relative one-character path with one part and file' => array('d/script.php', 'd'),
-                       'absolute zero-part path with file' => array('/script.php', ''),
-                       'empty string' => array('', '')
-               );
-       }
-
-       /**
-        * @test
-        * @dataProvider dirnameDataProvider
-        * @param string $input the input for dirname
-        * @param string $expectedValue the expected return value expected from dirname
-        */
-       public function dirnameWithDataProvider($input, $expectedValue) {
-               $this->assertEquals($expectedValue, \TYPO3\CMS\Core\Utility\GeneralUtility::dirname($input));
-       }
-
-       /////////////////////////////////////
-       // Tests concerning resolveBackPath
-       /////////////////////////////////////
-       /**
-        * @see resolveBackPathWithDataProvider
-        * @return array<array>
-        */
-       public function resolveBackPathDataProvider() {
-               return array(
-                       'empty path' => array('', ''),
-                       'this directory' => array('./', './'),
-                       'relative directory without ..' => array('dir1/dir2/dir3/', 'dir1/dir2/dir3/'),
-                       'relative path without ..' => array('dir1/dir2/script.php', 'dir1/dir2/script.php'),
-                       'absolute directory without ..' => array('/dir1/dir2/dir3/', '/dir1/dir2/dir3/'),
-                       'absolute path without ..' => array('/dir1/dir2/script.php', '/dir1/dir2/script.php'),
-                       'only one directory upwards without trailing slash' => array('..', '..'),
-                       'only one directory upwards with trailing slash' => array('../', '../'),
-                       'one level with trailing ..' => array('dir1/..', ''),
-                       'one level with trailing ../' => array('dir1/../', ''),
-                       'two levels with trailing ..' => array('dir1/dir2/..', 'dir1'),
-                       'two levels with trailing ../' => array('dir1/dir2/../', 'dir1/'),
-                       'leading ../ without trailing /' => array('../dir1', '../dir1'),
-                       'leading ../ with trailing /' => array('../dir1/', '../dir1/'),
-                       'leading ../ and inside path' => array('../dir1/dir2/../dir3/', '../dir1/dir3/'),
-                       'one times ../ in relative directory' => array('dir1/../dir2/', 'dir2/'),
-                       'one times ../ in absolute directory' => array('/dir1/../dir2/', '/dir2/'),
-                       'one times ../ in relative path' => array('dir1/../dir2/script.php', 'dir2/script.php'),
-                       'one times ../ in absolute path' => array('/dir1/../dir2/script.php', '/dir2/script.php'),
-                       'consecutive ../' => array('dir1/dir2/dir3/../../../dir4', 'dir4'),
-                       'distrubuted ../ with trailing /' => array('dir1/../dir2/dir3/../', 'dir2/'),
-                       'distributed ../ without trailing /' => array('dir1/../dir2/dir3/..', 'dir2'),
-                       'multiple distributed and consecutive ../ together' => array('dir1/dir2/dir3/dir4/../../dir5/dir6/dir7/../dir8/', 'dir1/dir2/dir5/dir6/dir8/'),
-                       'multiple distributed and consecutive ../ together' => array('dir1/dir2/dir3/dir4/../../dir5/dir6/dir7/../dir8/', 'dir1/dir2/dir5/dir6/dir8/'),
-                       'dirname with leading ..' => array('dir1/..dir2/dir3/', 'dir1/..dir2/dir3/'),
-                       'dirname with trailing ..' => array('dir1/dir2../dir3/', 'dir1/dir2../dir3/'),
-                       'more times upwards than downwards in directory' => array('dir1/../../', '../'),
-                       'more times upwards than downwards in path' => array('dir1/../../script.php', '../script.php')
-               );
-       }
-
-       /**
-        * @test
-        * @dataProvider resolveBackPathDataProvider
-        * @param string $input the input for resolveBackPath
-        * @param $expectedValue the expected return value from resolveBackPath
-        */
-       public function resolveBackPathWithDataProvider($input, $expectedValue) {
-               $this->assertEquals($expectedValue, \TYPO3\CMS\Core\Utility\GeneralUtility::resolveBackPath($input));
-       }
-
-       /////////////////////////////////////////////////////////////////////////////////////
-       // Tests concerning makeInstance, setSingletonInstance, addInstance, purgeInstances
-       /////////////////////////////////////////////////////////////////////////////////////
-       /**
-        * @test
-        * @expectedException InvalidArgumentException
-        */
-       public function makeInstanceWithEmptyClassNameThrowsException() {
-               \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('');
-       }
-
-       /**
-        * @test
-        * @expectedException InvalidArgumentException
-        */
-       public function makeInstanceWithNullClassNameThrowsException() {
-               \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(NULL);
-       }
-
-       /**
-        * @test
-        * @expectedException InvalidArgumentException
-        */
-       public function makeInstanceWithZeroStringClassNameThrowsException() {
-               \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(0);
-       }
-
-       /**
-        * @test
-        * @expectedException InvalidArgumentException
-        */
-       public function makeInstanceWithEmptyArrayThrowsException() {
-               \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(array());
-       }
-
-       /**
-        * @test
-        * @expectedException InvalidArgumentException
-        */
-       public function makeInstanceWithNonEmptyArrayThrowsException() {
-               \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(array('foo'));
-       }
-
-       /**
-        * @test
-        */
-       public function makeInstanceReturnsClassInstance() {
-               $className = get_class($this->getMock('foo'));
-               $this->assertTrue(\TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance($className) instanceof $className);
-       }
-
-       /**
-        * @test
-        */
-       public function makeInstancePassesParametersToConstructor() {
-               $className = 'testingClass' . uniqid();
-               if (!class_exists($className, FALSE)) {
-                       eval((((((((('class ' . $className) . ' {') . '  public $constructorParameter1;') . '  public $constructorParameter2;') . '  public function __construct($parameter1, $parameter2) {') . '    $this->constructorParameter1 = $parameter1;') . '    $this->constructorParameter2 = $parameter2;') . '  }') . '}');
-               }
-               $instance = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance($className, 'one parameter', 'another parameter');
-               $this->assertEquals('one parameter', $instance->constructorParameter1, 'The first constructor parameter has not been set.');
-               $this->assertEquals('another parameter', $instance->constructorParameter2, 'The second constructor parameter has not been set.');
-       }
-
-       /**
-        * @test
-        */
-       public function makeInstanceCalledTwoTimesForNonSingletonClassReturnsDifferentInstances() {
-               $className = get_class($this->getMock('foo'));
-               $this->assertNotSame(\TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance($className), \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance($className));
-       }
-
-       /**
-        * @test
-        */
-       public function makeInstanceCalledTwoTimesForSingletonClassReturnsSameInstance() {
-               $className = get_class($this->getMock('TYPO3\\CMS\\Core\\SingletonInterface'));
-               $this->assertSame(\TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance($className), \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance($className));
-       }
-
-       /**
-        * @test
-        */
-       public function makeInstanceCalledTwoTimesForSingletonClassWithPurgeInstancesInbetweenReturnsDifferentInstances() {
-               $className = get_class($this->getMock('TYPO3\\CMS\\Core\\SingletonInterface'));
-               $instance = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance($className);
-               \TYPO3\CMS\Core\Utility\GeneralUtility::purgeInstances();
-               $this->assertNotSame($instance, \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance($className));
-       }
-
-       /**
-        * @test
-        * @expectedException InvalidArgumentException
-        */
-       public function setSingletonInstanceForEmptyClassNameThrowsException() {
-               $instance = $this->getMock('TYPO3\\CMS\\Core\\SingletonInterface');
-               \TYPO3\CMS\Core\Utility\GeneralUtility::setSingletonInstance('', $instance);
-       }
-
-       /**
-        * @test
-        * @expectedException InvalidArgumentException
-        */
-       public function setSingletonInstanceForClassThatIsNoSubclassOfProvidedClassThrowsException() {
-               $instance = $this->getMock('TYPO3\\CMS\\Core\\SingletonInterface', array('foo'));
-               $singletonClassName = get_class($this->getMock('TYPO3\\CMS\\Core\\SingletonInterface'));
-               \TYPO3\CMS\Core\Utility\GeneralUtility::setSingletonInstance($singletonClassName, $instance);
-       }
-
-       /**
-        * @test
-        */
-       public function setSingletonInstanceMakesMakeInstanceReturnThatInstance() {
-               $instance = $this->getMock('TYPO3\\CMS\\Core\\SingletonInterface');
-               $singletonClassName = get_class($instance);
-               \TYPO3\CMS\Core\Utility\GeneralUtility::setSingletonInstance($singletonClassName, $instance);
-               $this->assertSame($instance, \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance($singletonClassName));
-       }
-
-       /**
-        * @test
-        */
-       public function setSingletonInstanceCalledTwoTimesMakesMakeInstanceReturnLastSetInstance() {
-               $instance1 = $this->getMock('TYPO3\\CMS\\Core\\SingletonInterface');
-               $singletonClassName = get_class($instance1);
-               $instance2 = new $singletonClassName();
-               \TYPO3\CMS\Core\Utility\GeneralUtility::setSingletonInstance($singletonClassName, $instance1);
-               \TYPO3\CMS\Core\Utility\GeneralUtility::setSingletonInstance($singletonClassName, $instance2);
-               $this->assertSame($instance2, \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance($singletonClassName));
-       }
-
-       /**
-        * @test
-        * @expectedException InvalidArgumentException
-        */
-       public function addInstanceForEmptyClassNameThrowsException() {
-               $instance = $this->getMock('foo');
-               \TYPO3\CMS\Core\Utility\GeneralUtility::addInstance('', $instance);
-       }
-
-       /**
-        * @test
-        * @expectedException InvalidArgumentException
-        */
-       public function addInstanceForClassThatIsNoSubclassOfProvidedClassThrowsException() {
-               $instance = $this->getMock('foo', array('bar'));
-               $singletonClassName = get_class($this->getMock('foo'));
-               \TYPO3\CMS\Core\Utility\GeneralUtility::addInstance($singletonClassName, $instance);
-       }
-
-       /**
-        * @test
-        * @expectedException InvalidArgumentException
-        */
-       public function addInstanceWithSingletonInstanceThrowsException() {
-               $instance = $this->getMock('TYPO3\\CMS\\Core\\SingletonInterface');
-               \TYPO3\CMS\Core\Utility\GeneralUtility::addInstance(get_class($instance), $instance);
-       }
-
-       /**
-        * @test
-        */
-       public function addInstanceMakesMakeInstanceReturnThatInstance() {
-               $instance = $this->getMock('foo');
-               $className = get_class($instance);
-               \TYPO3\CMS\Core\Utility\GeneralUtility::addInstance($className, $instance);
-               $this->assertSame($instance, \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance($className));
-       }
-
-       /**
-        * @test
-        */
-       public function makeInstanceCalledTwoTimesAfterAddInstanceReturnTwoDifferentInstances() {
-               $instance = $this->getMock('foo');
-               $className = get_class($instance);
-               \TYPO3\CMS\Core\Utility\GeneralUtility::addInstance($className, $instance);
-               $this->assertNotSame(\TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance($className), \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance($className));
-       }
-
-       /**
-        * @test
-        */
-       public function addInstanceCalledTwoTimesMakesMakeInstanceReturnBothInstancesInAddingOrder() {
-               $instance1 = $this->getMock('foo');
-               $className = get_class($instance1);
-               \TYPO3\CMS\Core\Utility\GeneralUtility::addInstance($className, $instance1);
-               $instance2 = new $className();
-               \TYPO3\CMS\Core\Utility\GeneralUtility::addInstance($className, $instance2);
-               $this->assertSame($instance1, \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance($className), 'The first returned instance does not match the first added instance.');
-               $this->assertSame($instance2, \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance($className), 'The second returned instance does not match the second added instance.');
-       }
-
-       /**
-        * @test
-        */
-       public function purgeInstancesDropsAddedInstance() {
-               $instance = $this->getMock('foo');
-               $className = get_class($instance);
-               \TYPO3\CMS\Core\Utility\GeneralUtility::addInstance($className, $instance);
-               \TYPO3\CMS\Core\Utility\GeneralUtility::purgeInstances();
-               $this->assertNotSame($instance, \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance($className));
-       }
-
-       /**
-        * Data provider for validPathStrDetectsInvalidCharacters.
-        *
-        * @return array
-        */
-       public function validPathStrInvalidCharactersDataProvider() {
-               return array(
-                       'double slash in path' => array('path//path'),
-                       'backslash in path' => array('path\\path'),
-                       'directory up in path' => array('path/../path'),
-                       'directory up at the beginning' => array('../path'),
-                       'NUL character in path' => array('path\0path'),
-                       'BS character in path' => array('path\bpath')
-               );
-       }
-
-       /**
-        * Tests whether invalid characters are detected.
-        *
-        * @param string $path
-        * @dataProvider validPathStrInvalidCharactersDataProvider
-        * @test
-        */
-       public function validPathStrDetectsInvalidCharacters($path) {
-               $this->assertFalse(\TYPO3\CMS\Core\Utility\GeneralUtility::validPathStr($path));
-       }
-
-       /**
-        * Tests whether Unicode characters are recognized as valid file name characters.
-        *
-        * @test
-        */
-       public function validPathStrWorksWithUnicodeFileNames() {
-               $this->assertTrue(\TYPO3\CMS\Core\Utility\GeneralUtility::validPathStr('fileadmin/templates/Ссылка (fce).xml'));
-       }
-
-       /**
-        * Tests whether verifyFilenameAgainstDenyPattern detects the NULL character.
-        *
-        * @test
-        */
-       public function verifyFilenameAgainstDenyPatternDetectsNullCharacter() {
-               $this->assertFalse(\TYPO3\CMS\Core\Utility\GeneralUtility::verifyFilenameAgainstDenyPattern('image\0.gif'));
-       }
-
-       /////////////////////////////////////////////////////////////////////////////////////
-       // Tests concerning sysLog
-       /////////////////////////////////////////////////////////////////////////////////////
-       /**
-        * @test
-        */
-       public function syslogFixesPermissionsOnFileIfUsingFileLogging() {
-               if (TYPO3_OS == 'WIN') {
-                       $this->markTestSkipped('syslogFixesPermissionsOnFileIfUsingFileLogging() test not available on Windows.');
-               }
-               // Fake all required settings
-               $GLOBALS['TYPO3_CONF_VARS']['SYS']['systemLogLevel'] = 0;
-               $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_div.php']['systemLogInit'] = TRUE;
-               unset($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_div.php']['systemLog']);
-               $testLogFilename = ((PATH_site . 'typo3temp/') . uniqid('test_')) . '.txt';
-               $GLOBALS['TYPO3_CONF_VARS']['SYS']['systemLog'] = ('file,' . $testLogFilename) . ',0';
-               $GLOBALS['TYPO3_CONF_VARS']['BE']['fileCreateMask'] = '0777';
-               // Call method, get actual permissions and clean up
-               \TYPO3\CMS\Core\Utility\GeneralUtility::syslog('testLog', 'test', \TYPO3\CMS\Core\Utility\GeneralUtility::SYSLOG_SEVERITY_NOTICE);
-               clearstatcache();
-               $resultFilePermissions = substr(decoct(fileperms($testLogFilename)), 2);
-               \TYPO3\CMS\Core\Utility\GeneralUtility::unlink_tempfile($testLogFilename);
-               $this->assertEquals($resultFilePermissions, '0777');
-       }
-
-       /**
-        * @test
-        */
-       public function deprecationLogFixesPermissionsOnLogFile() {
-               if (TYPO3_OS == 'WIN') {
-                       $this->markTestSkipped('deprecationLogFixesPermissionsOnLogFile() test not available on Windows.');
-               }
-               // Fake all required settings and get an unique logfilename
-               $GLOBALS['TYPO3_CONF_VARS']['SYS']['encryptionKey'] = uniqid('test_');
-               $deprecationLogFilename = \TYPO3\CMS\Core\Utility\GeneralUtility::getDeprecationLogFileName();
-               $GLOBALS['TYPO3_CONF_VARS']['SYS']['enableDeprecationLog'] = TRUE;
-               $GLOBALS['TYPO3_CONF_VARS']['BE']['fileCreateMask'] = '0777';
-               // Call method, get actual permissions and clean up
-               \TYPO3\CMS\Core\Utility\GeneralUtility::deprecationLog('foo');
-               clearstatcache();
-               $resultFilePermissions = substr(decoct(fileperms($deprecationLogFilename)), 2);
-               @unlink($deprecationLogFilename);
-               $this->assertEquals($resultFilePermissions, '0777');
-       }
-
-       ///////////////////////////////////////////////////
-       // Tests concerning callUserFunction
-       ///////////////////////////////////////////////////
-       /**
-        * @test
-        * @dataProvider callUserFunctionInvalidParameterDataprovider
-        */
-       public function callUserFunctionWillReturnFalseForInvalidParameters($functionName) {
-               $inputData = array('foo' => 'bar');
-               // omit the debug() output
-               ob_start();
-               $result = \TYPO3\CMS\Core\Utility\GeneralUtility::callUserFunction($functionName, $inputData, $this, 'user_');
-               ob_end_clean();
-               $this->assertFalse($result);
-       }
-
-       /**
-        * @test
-        * @dataProvider callUserFunctionInvalidParameterDataprovider
-        * @expectedException InvalidArgumentException
-        */
-       public function callUserFunctionWillThrowExceptionForInvalidParameters($functionName) {
-               $inputData = array('foo' => 'bar');
-               \TYPO3\CMS\Core\Utility\GeneralUtility::callUserFunction($functionName, $inputData, $this, 'user_', 2);
-       }
-
-       /**
-        * Data provider for callUserFunctionInvalidParameterDataprovider and
-        * callUserFunctionWillThrowExceptionForInvalidParameters.
-        *
-        * @return array
-        */
-       public function callUserFunctionInvalidParameterDataprovider() {
-               return array(
-                       'Function is not prefixed' => array('t3lib_divTest->calledUserFunction'),
-                       'Class doesn\'t exists' => array('t3lib_divTest21345->user_calledUserFunction'),
-                       'No method name' => array('t3lib_divTest'),
-                       'No class name' => array('->user_calledUserFunction'),
-                       'No function name' => array('')
-               );
-       }
-
-       /**
-        * Above tests already showed that the prefix is checked properly,
-        * therefore this test skips the prefix and enables to inline the instantly
-        * created function (who's name doesn't have a prefix).
-        *
-        * @test
-        */
-       public function callUserFunctionCanCallFunction() {
-               $functionName = create_function('', 'return "Worked fine";');
-               $inputData = array('foo' => 'bar');
-               $result = \TYPO3\CMS\Core\Utility\GeneralUtility::callUserFunction($functionName, $inputData, $this, '');
-               $this->assertEquals('Worked fine', $result);
-       }
-
-       /**
-        * @test
-        */
-       public function callUserFunctionCanCallMethod() {
-               $inputData = array('foo' => 'bar');
-               $result = \TYPO3\CMS\Core\Utility\GeneralUtility::callUserFunction('t3lib_divTest->user_calledUserFunction', $inputData, $this);
-               $this->assertEquals('Worked fine', $result);
-       }
-
-       /**
-        * @return string
-        */
-       public function user_calledUserFunction() {
-               return 'Worked fine';
-       }
-
-       /**
-        * @test
-        */
-       public function callUserFunctionCanPrefixFuncNameWithFilePath() {
-               $inputData = array('foo' => 'bar');
-               $result = \TYPO3\CMS\Core\Utility\GeneralUtility::callUserFunction('t3lib/class.t3lib_div.php:t3lib_divTest->user_calledUserFunction', $inputData, $this);
-               $this->assertEquals('Worked fine', $result);
-       }
-
-       /**
-        * @test
-        */
-       public function callUserFunctionCanPersistObjectsBetweenCalls() {
-               $inputData = array('called' => array());
-               \TYPO3\CMS\Core\Utility\GeneralUtility::callUserFunction('&t3lib_divTest->user_calledUserFunctionCountCallers', $inputData, $this);
-               \TYPO3\CMS\Core\Utility\GeneralUtility::callUserFunction('&t3lib_divTest->user_calledUserFunctionCountCallers', $inputData, $this);
-               $this->assertEquals(1, sizeof($inputData['called']));
-       }
-
-       /**
-        * Takes the object hash and adds it to the passed array. In case
-        * persisting the objects would not work we'd see two different
-        * parent objects.
-        *
-        * @param $params
-        */
-       public function user_calledUserFunctionCountCallers(&$params) {
-               $params['called'][spl_object_hash($this)]++;
-       }
-
-       /**
-        * @test
-        */
-       public function callUserFunctionAcceptsClosures() {
-               $inputData = array('foo' => 'bar');
-               $closure = function ($parameters, $reference) use($inputData) {
-                       $reference->assertEquals($inputData, $parameters, 'Passed data doesn\'t match expected output');
-                       return 'Worked fine';
-               };
-               $this->assertEquals('Worked fine', \TYPO3\CMS\Core\Utility\GeneralUtility::callUserFunction($closure, $inputData, $this));
-       }
-
-       ///////////////////////////////////////////////////
-       // Tests concerning hasValidClassPrefix
-       ///////////////////////////////////////////////////
-       /**
-        * @return array
-        */
-       public function validClassPrefixDataProvider() {
-               return array(
-                       'normal prefix' => array('tx_foo'),
-                       'normal long prefix' => array('tx_foo_bar'),
-                       'extbase named prefix' => array('Tx_foo'),
-                       'user func named prefix' => array('user_foo'),
-                       'empty string' => array('')
-               );
-       }
-
-       /**
-        * @test
-        * @dataProvider validClassPrefixDataProvider
-        * @param string $className Class name to test
-        */
-       public function hasValidClassPrefixAcceptsValidPrefixes($className) {
-               $this->assertTrue(\TYPO3\CMS\Core\Utility\GeneralUtility::hasValidClassPrefix($className));
-       }
-
-       ///////////////////////////////////////////////////
-       // Tests concerning generateRandomBytes
-       ///////////////////////////////////////////////////
-       /**
-        * @test
-        * @dataProvider generateRandomBytesReturnsExpectedAmountOfBytesDataProvider
-        * @param int $numberOfBytes Number of Bytes to generate
-        */
-       public function generateRandomBytesReturnsExpectedAmountOfBytes($numberOfBytes) {
-               $this->assertEquals(strlen(\TYPO3\CMS\Core\Utility\GeneralUtility::generateRandomBytes($numberOfBytes)), $numberOfBytes);
-       }
-
-       public function generateRandomBytesReturnsExpectedAmountOfBytesDataProvider() {
-               return array(
-                       array(1),
-                       array(2),
-                       array(3),
-                       array(4),
-                       array(7),
-                       array(8),
-                       array(31),
-                       array(32),
-                       array(100),
-                       array(102),
-                       array(4000),
-                       array(4095),
-                       array(4096),
-                       array(4097),
-                       array(8000)
-               );
-       }
-
-       /**
-        * @test
-        * @dataProvider generateRandomBytesReturnsDifferentBytesDuringDifferentCallsDataProvider
-        * @param int $numberOfBytes  Number of Bytes to generate
-        */
-       public function generateRandomBytesReturnsDifferentBytesDuringDifferentCalls($numberOfBytes) {
-               $results = array();
-               $numberOfTests = 5;
-               // generate a few random numbers
-               for ($i = 0; $i < $numberOfTests; $i++) {
-                       $results[$i] = \TYPO3\CMS\Core\Utility\GeneralUtility::generateRandomBytes($numberOfBytes);
-               }
-               // array_unique would filter out duplicates
-               $this->assertEquals($results, array_unique($results));
-       }
-
-       public function generateRandomBytesReturnsDifferentBytesDuringDifferentCallsDataProvider() {
-               return array(
-                       array(32),
-                       array(128),
-                       array(4096)
-               );
-       }
-
-       /**
-        * @test
-        */
-       public function arrayMergeRecursiveOverruleDoesConsiderUnsetValues() {
-               $array1 = array(
-                       'first' => array(
-                               'second' => 'second',
-                               'third' => 'third'
-                       )
-               );
-               $array2 = array(
-                       'first' => array(
-                               'second' => 'overrule',
-                               'third' => '__UNSET',
-                               'fourth' => 'overrile'
-                       )
-               );
-               $expected = array(
-                       'first' => array(
-                               'second' => 'overrule',
-                               'fourth' => 'overrile'
-                       )
-               );
-               $result = \TYPO3\CMS\Core\Utility\GeneralUtility::array_merge_recursive_overrule($array1, $array2);
-               $this->assertEquals($expected, $result);
-       }
-
-       ///////////////////////////////////////////////////
-       // Tests concerning substUrlsInPlainText
-       ///////////////////////////////////////////////////
-       /**
-        * @return array
-        */
-       public function substUrlsInPlainTextDataProvider() {
-               $urlMatch = 'http://example.com/index.php\\?RDCT=[0-9a-z]{20}';
-               return array(
-                       array('http://only-url.com', ('|^' . $urlMatch) . '$|'),
-                       array('https://only-secure-url.com', ('|^' . $urlMatch) . '$|'),
-                       array('A http://url in the sentence.', ('|^A ' . $urlMatch) . ' in the sentence\\.$|'),
-                       array('URL in round brackets (http://www.example.com) in the sentence.', ('|^URL in round brackets \\(' . $urlMatch) . '\\) in the sentence.$|'),
-                       array('URL in square brackets [http://www.example.com/a/b.php?c[d]=e] in the sentence.', ('|^URL in square brackets \\[' . $urlMatch) . '\\] in the sentence.$|'),
-                       array('URL in square brackets at the end of the sentence [http://www.example.com/a/b.php?c[d]=e].', ('|^URL in square brackets at the end of the sentence \\[' . $urlMatch) . '].$|'),
-                       array('Square brackets in the http://www.url.com?tt_news[uid]=1', ('|^Square brackets in the ' . $urlMatch) . '$|'),
-                       array('URL with http://dot.com.', ('|^URL with ' . $urlMatch) . '.$|'),
-                       array('URL in <a href="http://www.example.com/">a tag</a>', ('|^URL in <a href="' . $urlMatch) . '">a tag</a\\>$|'),
-                       array('URL in HTML <b>http://www.example.com</b><br />', ('|^URL in HTML <b>' . $urlMatch) . '</b><br />$|'),
-                       array('URL with http://username@example.com/', ('|^URL with ' . $urlMatch) . '$|'),
-                       array('Secret in URL http://username:secret@example.com', ('|^Secret in URL ' . $urlMatch) . '$|'),
-                       array('URL in quotation marks "http://example.com"', ('|^URL in quotation marks "' . $urlMatch) . '"$|'),
-                       array('URL with umlauts http://müller.de', ('|^URL with umlauts ' . $urlMatch) . '$|'),
-                       array('Multiline
-text with a http://url.com', ('|^Multiline
-text with a ' . $urlMatch) . '$|s'),
-                       array('http://www.shout.com!', ('|^' . $urlMatch) . '!$|'),
-                       array('And with two URLs http://www.two.com/abc http://urls.com/abc?x=1&y=2', ((('|^And with two URLs ' . $urlMatch) . ' ') . $urlMatch) . '$|')
-               );
-       }
-
-       /**
-        * @test
-        * @dataProvider substUrlsInPlainTextDataProvider
-        * @param string $input Text to recognise URLs from
-        * @param string $expected Text with correctly detected URLs
-        */
-       public function substUrlsInPlainText($input, $expectedPreg) {
-               $this->assertTrue(preg_match($expectedPreg, \TYPO3\CMS\Core\Utility\GeneralUtility::substUrlsInPlainText($input, 1, 'http://example.com/index.php')) == 1);
-       }
-
-}
-
-?>
\ No newline at end of file
diff --git a/tests/Unit/t3lib/class.t3lib_extfilefuncTest.php b/tests/Unit/t3lib/class.t3lib_extfilefuncTest.php
deleted file mode 100644 (file)
index 07164ea..0000000
+++ /dev/null
@@ -1,481 +0,0 @@
-<?php
-/* * *************************************************************
- *  Copyright notice
- *
- *  (c) 2011 Fabien Udriot <fabien.udriot@ecodev.ch>
- *  All rights reserved
- *
- *  This script is part of the TYPO3 project. The TYPO3 project is
- *  free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  The GNU General Public License can be found at
- *  http://www.gnu.org/copyleft/gpl.html.
- *
- *  This script is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  This copyright notice MUST APPEAR in all copies of the script!
- * ************************************************************* */
-/**
- * Testcase for class t3lib_extFileFunctions
- *
- * @author Fabien Udriot <fabien.udriot@ecodev.ch>
- * @package TYPO3
- * @subpackage t3lib
- */
-class t3lib_extFileFunctionsTest extends tx_phpunit_testcase {
-
-       /**
-        * @var fileProcessor
-        */
-       protected $fileProcessor;
-
-       /**
-        * @var \TYPO3\CMS\Core\Resource\StorageRepository
-        */
-       protected $storageRepository;
-
-       /**
-        * @var string
-        */
-       protected $newFileNameInput = '_unitTestedFile.txt';
-
-       /**
-        * @var string
-        */
-       protected $newFolderNameInput = '_unitTestedFolder';
-
-       /**
-        * @var string
-        */
-       protected $renameFileNameInput = '_unitTestedFileRenamed.txt';
-
-       /**
-        * @var string
-        */
-       protected $renameFolderNameInput = '_unitTestedFolderRenamed';
-
-       /**
-        * @var string
-        */
-       protected $copyFolderNameInput = '_unitTestedFolderCopied';
-
-       /**
-        * @var string
-        */
-       protected $moveFolderNameInput = '_unitTestedFolderMoved';
-
-       /**
-        * @var array
-        */
-       protected $objectsToTearDown = array();
-
-       /**
-        * Sets up this testcase
-        */
-       public function setUp() {
-               $this->storageRepository = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Resource\\StorageRepository');
-               // Initializing file processor
-               $GLOBALS['BE_USER'] = $this->getMock('TYPO3\\CMS\\Core\\Authentication\\BackendUserAuthentication', array('getSessionData', 'setAndSaveSessionData'));
-               $GLOBALS['BE_USER']->user['uid'] = 1;
-               $GLOBALS['FILEMOUNTS'] = array();
-               // Initializing:
-               $this->fileProcessor = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Utility\\File\\ExtendedFileUtility');
-               $this->fileProcessor->init($GLOBALS['FILEMOUNTS'], $GLOBALS['TYPO3_CONF_VARS']['BE']['fileExtensions']);
-               $this->fileProcessor->init_actionPerms($GLOBALS['BE_USER']->getFileoperationPermissions());
-               $this->fileProcessor->dontCheckForUnique = 1;
-       }
-
-       /**
-        * Tears down this testcase
-        */
-       public function tearDown() {
-               foreach ($this->objectsToTearDown as $object) {
-                       if ($object instanceof \TYPO3\CMS\Core\Resource\File || $object instanceof \TYPO3\CMS\Core\Resource\Folder) {
-                               $object->delete();
-                       }
-               }
-               $this->objectsToTearDown = array();
-       }
-
-       /**
-        * @return \TYPO3\CMS\Core\Resource\ResourceStorage
-        */
-       protected function getDefaultStorage() {
-               // Get the first storage available.
-               // Notice if no storage is found, a storage is created on the fly.
-               $storages = $this->storageRepository->findAll();
-               // Makes sure to return a storage having a local driver
-               foreach ($storages as $storage) {
-
-               }
-               /** @var $storage \TYPO3\CMS\Core\Resource\ResourceStorage */
-               return $storages[0];
-       }
-
-       /**
-        * @return string
-        */
-       protected function getRootFolderIdentifier() {
-               $storage = $this->getDefaultStorage();
-               $folderIdentifier = '/';
-               // the root of the storage
-               $folderCombinedIdentifier = ($storage->getUid() . ':') . $folderIdentifier;
-               return $folderCombinedIdentifier;
-       }
-
-       /*********************************
-        * CREATE
-        ********************************/
-       /**
-        * @test
-        */
-       public function createNewFileInLocalStorage() {
-               // Defines values
-               $fileValues = array(
-                       'newfile' => array(
-                               array(
-                                       'data' => $this->newFileNameInput,
-                                       'target' => $this->getRootFolderIdentifier()
-                               )
-                       )
-               );
-               $this->fileProcessor->start($fileValues);
-               $results = $this->fileProcessor->processData();
-               $fileObject = NULL;
-               if (!empty($results['newfile'][0])) {
-                       $fileObject = $results['newfile'][0];
-               }
-               $this->objectsToTearDown[] = $fileObject;
-               $this->assertEquals(TRUE, $fileObject instanceof \TYPO3\CMS\Core\Resource\File);
-       }
-
-       /**
-        * @test
-        */
-       public function createNewFolderInLocalStorage() {
-               // Defines values
-               $fileValues = array(
-                       'newfolder' => array(
-                               array(
-                                       'data' => $this->newFolderNameInput,
-                                       'target' => $this->getRootFolderIdentifier()
-                               )
-                       )
-               );
-               $this->fileProcessor->start($fileValues);
-               $results = $this->fileProcessor->processData();
-               $folderObject = NULL;
-               if (!empty($results['newfolder'][0])) {
-                       $folderObject = $results['newfolder'][0];
-               }
-               $this->objectsToTearDown[] = $folderObject;
-               $this->assertEquals(TRUE, $folderObject instanceof \TYPO3\CMS\Core\Resource\Folder);
-       }
-
-       /*********************************
-        * DELETE
-        ********************************/
-       /**
-        * @test
-        */
-       public function deleteFileInLocalStorage() {
-               // Computes a $fileIdentifier which looks like 8:/fileName.txt where 8 is the storage Uid
-               $storage = $this->getDefaultStorage();
-               $fileIdentifier = ($storage->getUid() . ':/') . $this->newFileNameInput;
-               // Defines values
-               $fileValues = array(
-                       'newfile' => array(
-                               array(
-                                       'data' => $this->newFileNameInput,
-                                       'target' => $this->getRootFolderIdentifier()
-                               )
-                       ),
-                       'delete' => array(
-                               array(
-                                       'data' => $fileIdentifier
-                               )
-                       )
-               );
-               $this->fileProcessor->start($fileValues);
-               $results = $this->fileProcessor->processData();
-               $this->assertEquals(TRUE, empty($results['delete'][1]));
-       }
-
-       /**
-        * @test
-        */
-       public function deleteFolderInLocalStorage() {
-               // Computes a $fileIdentifier which looks like 8:/fileName.txt where 8 is the storage Uid
-               $storage = $this->getDefaultStorage();
-               $folderIdentifier = ($storage->getUid() . ':/') . $this->newFolderNameInput;
-               // Defines values
-               $fileValues = array(
-                       'newfolder' => array(
-                               array(
-                                       'data' => $this->newFolderNameInput,
-                                       'target' => $this->getRootFolderIdentifier()
-                               )
-                       ),
-                       'delete' => array(
-                               array(
-                                       'data' => $folderIdentifier
-                               )
-                       )
-               );
-               $this->fileProcessor->start($fileValues);
-               $results = $this->fileProcessor->processData();
-               $this->assertEquals(TRUE, $results['delete'][0]);
-       }
-
-       /*********************************
-        * RENAME
-        ********************************/
-       /**
-        * @test
-        */
-       public function renameFileInLocalStorage() {
-               // Computes a $fileIdentifier which looks like 8:/fileName.txt where 8 is the storage Uid
-               $storage = $this->getDefaultStorage();
-               $fileIdentifier = ($storage->getUid() . ':/') . $this->newFileNameInput;
-               // Defines values
-               $fileValues = array(
-                       'newfile' => array(
-                               array(
-                                       'data' => $this->newFileNameInput,
-                                       'target' => $this->getRootFolderIdentifier()
-                               )
-                       ),
-                       'rename' => array(
-                               array(
-                                       'data' => $fileIdentifier,
-                                       'target' => $this->renameFileNameInput
-                               )
-                       )
-               );
-               $this->fileProcessor->start($fileValues);
-               $results = $this->fileProcessor->processData();
-               $fileObject = NULL;
-               if (!empty($results['rename'][0])) {
-                       $fileObject = $results['rename'][0];
-               }
-               $this->objectsToTearDown[] = $fileObject;
-               $this->assertEquals(TRUE, $fileObject instanceof \TYPO3\CMS\Core\Resource\File);
-       }
-
-       /**
-        * @test
-        */
-       public function renameFolderInLocalStorage() {
-               // Computes a $fileIdentifier which looks like 8:/fileName.txt where 8 is the storage Uid
-               $storage = $this->getDefaultStorage();
-               $folderIdentifier = ($storage->getUid() . ':/') . $this->newFolderNameInput;
-               // Defines values
-               $fileValues = array(
-                       'newfolder' => array(
-                               array(
-                                       'data' => $this->newFolderNameInput,
-                                       'target' => $this->getRootFolderIdentifier()
-                               )
-                       ),
-                       'rename' => array(
-                               array(
-                                       'data' => $folderIdentifier,
-                                       'target' => $this->renameFolderNameInput
-                               )
-                       )
-               );
-               $this->fileProcessor->start($fileValues);
-               $results = $this->fileProcessor->processData();
-               $folderObject = NULL;
-               if (!empty($results['rename'][0])) {
-                       $folderObject = $results['rename'][0];
-               }
-               $this->objectsToTearDown[] = $folderObject;
-               $this->assertEquals(TRUE, $folderObject instanceof \TYPO3\CMS\Core\Resource\Folder);
-       }
-
-       /*********************************
-        * MOVE
-        ********************************/
-       /**
-        * @test
-        */
-       public function moveFileInLocalStorage() {
-               // Computes a $fileIdentifier which looks like 8:/fileName.txt where 8 is the storage Uid
-               $storage = $this->getDefaultStorage();
-               $fileIdentifier = ($storage->getUid() . ':/') . $this->newFileNameInput;
-               $targetFolder = $this->getRootFolderIdentifier() . $this->newFolderNameInput;
-               // Defines values
-               $fileValues = array(
-                       'newfile' => array(
-                               array(
-                                       'data' => $this->newFileNameInput,
-                                       'target' => $this->getRootFolderIdentifier()
-                               )
-                       ),
-                       'newfolder' => array(
-                               array(
-                                       'data' => $this->newFolderNameInput,
-                                       'target' => $this->getRootFolderIdentifier()
-                               )
-                       ),
-                       'move' => array(
-                               array(
-                                       'data' => $fileIdentifier,
-                                       'target' => $targetFolder
-                               )
-                       )
-               );
-               $this->fileProcessor->start($fileValues);
-               $results = $this->fileProcessor->processData();
-               $fileObject = NULL;
-               if (!empty($results['move'][0])) {
-                       $fileObject = $results['move'][0];
-               }
-               // remove parent folder
-               if (!empty($results['newfolder'][0])) {
-                       $this->objectsToTearDown[] = $results['newfolder'][0];
-               }
-               $this->assertEquals(TRUE, $fileObject instanceof \TYPO3\CMS\Core\Resource\File);
-       }
-
-       /**
-        * @test
-        */
-       public function moveFolderInLocalStorage() {
-               // Computes a $folderIdentifier which looks like 8:/folderName.txt where 8 is the storage Uid
-               $storage = $this->getDefaultStorage();
-               $folderIdentifier = ($storage->getUid() . ':/') . $this->moveFolderNameInput;
-               $targetFolder = $this->getRootFolderIdentifier() . $this->newFolderNameInput;
-               // Defines values
-               $fileValues = array(
-                       'newfolder' => array(
-                               array(
-                                       'data' => $this->newFolderNameInput,
-                                       'target' => $this->getRootFolderIdentifier()
-                               ),
-                               array(
-                                       'data' => $this->moveFolderNameInput,
-                                       'target' => $this->getRootFolderIdentifier()
-                               )
-                       ),
-                       'move' => array(
-                               array(
-                                       'data' => $folderIdentifier,
-                                       'target' => $targetFolder
-                               )
-                       )
-               );
-               $this->fileProcessor->start($fileValues);
-               $results = $this->fileProcessor->processData();
-               $folderObject = NULL;
-               if (!empty($results['move'][0])) {
-                       $folderObject = $results['move'][0];
-               }
-               // remove parent folder
-               if (!empty($results['newfolder'][0])) {
-                       $this->objectsToTearDown[] = $results['newfolder'][0];
-               }
-               $this->assertEquals(TRUE, $folderObject instanceof \TYPO3\CMS\Core\Resource\Folder);
-       }
-
-       /*********************************
-        * COPY
-        ********************************/
-       /**
-        * @test
-        */
-       public function copyFileInLocalStorage() {
-               // Computes a $fileIdentifier which looks like 8:/fileName.txt where 8 is the storage Uid
-               $storage = $this->getDefaultStorage();
-               $fileIdentifier = ($storage->getUid() . ':/') . $this->newFileNameInput;
-               $targetFolder = $this->getRootFolderIdentifier() . $this->newFolderNameInput;
-               // Defines values
-               $fileValues = array(
-                       'newfile' => array(
-                               array(
-                                       'data' => $this->newFileNameInput,
-                                       'target' => $this->getRootFolderIdentifier()
-                               )
-                       ),
-                       'newfolder' => array(
-                               array(
-                                       'data' => $this->newFolderNameInput,
-                                       'target' => $this->getRootFolderIdentifier()
-                               )
-                       ),
-                       'copy' => array(
-                               array(
-                                       'data' => $fileIdentifier,
-                                       'target' => $targetFolder
-                               )
-                       )
-               );
-               $this->fileProcessor->start($fileValues);
-               $results = $this->fileProcessor->processData();
-               $fileObject = NULL;
-               if (!empty($results['copy'][0])) {
-                       $fileObject = $results['copy'][0];
-               }
-               // remove parent folder
-               if (!empty($results['newfolder'][0])) {
-                       $this->objectsToTearDown[] = $results['newfolder'][0];
-               }
-               if (!empty($results['newfile'][0])) {
-                       $this->objectsToTearDown[] = $results['newfile'][0];
-               }
-               $this->assertEquals(TRUE, $fileObject instanceof \TYPO3\CMS\Core\Resource\File);
-       }
-
-       /**
-        * @test
-        */
-       public function copyFolderInLocalStorage() {
-               // Computes a $folderIdentifier which looks like 8:/folderName.txt where 8 is the storage Uid
-               $storage = $this->getDefaultStorage();
-               $folderIdentifier = ($storage->getUid() . ':/') . $this->copyFolderNameInput;
-               $targetFolder = $this->getRootFolderIdentifier() . $this->newFolderNameInput;
-               // Defines values
-               $fileValues = array(
-                       'newfolder' => array(
-                               array(
-                                       'data' => $this->newFolderNameInput,
-                                       'target' => $this->getRootFolderIdentifier()
-                               ),
-                               array(
-                                       'data' => $this->copyFolderNameInput,
-                                       'target' => $this->getRootFolderIdentifier()
-                               )
-                       ),
-                       'copy' => array(
-                               array(
-                                       'data' => $folderIdentifier,
-                                       'target' => $targetFolder
-                               )
-                       )
-               );
-               $this->fileProcessor->start($fileValues);
-               $results = $this->fileProcessor->processData();
-               $folderObject = NULL;
-               if (!empty($results['copy'][0])) {
-                       $folderObject = $results['copy'][0];
-               }
-               // remove parent folder
-               if (!empty($results['newfolder'][0])) {
-                       $this->objectsToTearDown[] = $results['newfolder'][0];
-               }
-               if (!empty($results['newfolder'][1])) {
-                       $this->objectsToTearDown[] = $results['newfolder'][1];
-               }
-               $this->assertEquals(TRUE, $folderObject instanceof \TYPO3\CMS\Core\Resource\Folder);
-       }
-
-}
-
-?>
\ No newline at end of file
diff --git a/tests/Unit/t3lib/class.t3lib_extmgmTest.php b/tests/Unit/t3lib/class.t3lib_extmgmTest.php
deleted file mode 100644 (file)
index 2fae53f..0000000
+++ /dev/null
@@ -1,1115 +0,0 @@
-<?php
-/***************************************************************
- *  Copyright notice
- *
- *  (c) 2009-2011 Oliver Hader <oliver@typo3.org>
- *  All rights reserved
- *
- *  This script is part of the TYPO3 project. The TYPO3 project is
- *  free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  The GNU General Public License can be found at
- *  http://www.gnu.org/copyleft/gpl.html.
- *
- *  This script is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  This copyright notice MUST APPEAR in all copies of the script!
- ***************************************************************/
-/**
- * Testcase for class t3lib_extMgm
- *
- * @author Oliver Hader <oliver@typo3.org>
- * @author Oliver Klee <typo3-coding@oliverklee.de>
- * @package TYPO3
- * @subpackage t3lib
- */
-class t3lib_extmgmTest extends tx_phpunit_testcase {
-
-       /**
-        * Enable backup of global and system variables
-        *
-        * @var boolean
-        */
-       protected $backupGlobals = TRUE;
-
-       /**
-        * Exclude TYPO3_DB from backup/ restore of $GLOBALS
-        * because resource types cannot be handled during serializing
-        *
-        * @var array
-        */
-       protected $backupGlobalsBlacklist = array('TYPO3_DB');
-
-       /**
-        * phpunit still needs some globals that are
-        * reconstructed before $backupGlobals is handled. Those
-        * important globals are handled in tearDown() directly.
-        *
-        * @var array
-        */
-       protected $globals = array();
-
-       /**
-        * Absolute path to files that must be removed
-        * after a test - handled in tearDown
-        *
-        * @TODO : Check if the tests can use vfs:// instead
-        */
-       protected $testFilesToDelete = array();
-
-       public function setUp() {
-               $this->createAccessibleProxyClass();
-               $this->globals = array(
-                       'TYPO3_LOADED_EXT' => serialize($GLOBALS['TYPO3_LOADED_EXT'])
-               );
-               $this->testFilesToDelete = array();
-       }
-
-       public function tearDown() {
-               \TYPO3\CMS\Core\Extension\ExtensionManager::clearExtensionKeyMap();
-               foreach ($this->globals as $key => $value) {
-                       $GLOBALS[$key] = unserialize($value);
-               }
-               foreach ($this->testFilesToDelete as $absoluteFileName) {
-                       \TYPO3\CMS\Core\Utility\GeneralUtility::unlink_tempfile($absoluteFileName);
-               }
-               \TYPO3\CMS\Core\Utility\GeneralUtility::purgeInstances();
-       }
-
-       /**
-        * Create a subclass with protected methods made public
-        *
-        * @return void
-        */
-       protected function createAccessibleProxyClass() {
-               $namespace = 'TYPO3\\CMS\\Core\\Extension';
-               $className = 'ExtensionManagerAccessibleProxy';
-               if (!class_exists($namespace . '\\' . $className, FALSE)) {
-                       eval((((((((((((((((((((((((((('namespace ' . $namespace . '; class ' . $className) . ' extends \\TYPO3\\CMS\\Core\\Extension\\ExtensionManager {') . '  public static function createTypo3LoadedExtensionInformationArray() {') . '    return parent::createTypo3LoadedExtensionInformationArray();') . '  }') . '  public static function getTypo3LoadedExtensionInformationCacheIdentifier() {') . '    return parent::getTypo3LoadedExtensionInformationCacheIdentifier();') . '  }') . '  public static function getExtLocalconfCacheIdentifier() {') . '    return parent::getExtLocalconfCacheIdentifier();') . '  }') . '  public static function loadSingleExtLocalconfFiles() {') . '    return parent::loadSingleExtLocalconfFiles();') . '  }') . '  public static function resetExtTablesWasReadFromCacheOnceBoolean() {') . '    self::$extTablesWasReadFromCacheOnce = FALSE;') . '  }') . '  public static function createExtLocalconfCacheEntry() {') . '    return parent::createExtLocalconfCacheEntry();') . '  }') . '  public static function createExtTablesCacheEntry() {') . '    return parent::createExtTablesCacheEntry();') . '  }') . '  public static function getExtTablesCacheIdentifier() {') . '    return parent::getExtTablesCacheIdentifier();') . '  }') . '}');
-               }
-       }
-
-       ///////////////////////////////
-       // Tests concerning isLoaded
-       ///////////////////////////////
-       /**
-        * @test
-        */
-       public function isLoadedReturnsTrueIfExtensionIsLoaded() {
-               $this->assertTrue(\TYPO3\CMS\Core\Extension\ExtensionManager::isLoaded('cms'));
-       }
-
-       /**
-        * @test
-        */
-       public function isLoadedReturnsFalseIfExtensionIsNotLoadedAndExitIsDisabled() {
-               $this->assertFalse(\TYPO3\CMS\Core\Extension\ExtensionManager::isLoaded(uniqid('foobar'), FALSE));
-       }
-
-       /**
-        * @test
-        * @expectedException BadFunctionCallException
-        */
-       public function isLoadedThrowsExceptionIfExtensionIsNotLoaded() {
-               $this->assertFalse(\TYPO3\CMS\Core\Extension\ExtensionManager::isLoaded(uniqid('foobar'), TRUE));
-       }
-
-       ///////////////////////////////
-       // Tests concerning extPath
-       ///////////////////////////////
-       /**
-        * @test
-        * @expectedException BadFunctionCallException
-        */
-       public function extPathThrowsExceptionIfExtensionIsNotLoaded() {
-               $GLOBALS['TYPO3_LOADED_EXT']['foo'] = array();
-               \TYPO3\CMS\Core\Extension\ExtensionManager::extPath('bar');
-       }
-
-       /**
-        * @test
-        */
-       public function extPathAppendsScriptNameToPath() {
-               $GLOBALS['TYPO3_LOADED_EXT']['foo']['siteRelPath'] = 'foo/';
-               $this->assertSame(PATH_site . 'foo/bar.txt', \TYPO3\CMS\Core\Extension\ExtensionManager::extPath('foo', 'bar.txt'));
-       }
-
-       /**
-        * @test
-        * @expectedException BadFunctionCallException
-        */
-       public function extPathThrowsExceptionIfExtensionIsNotLoadedAndTypo3LoadedExtensionsIsEmpty() {
-               unset($GLOBALS['TYPO3_LOADED_EXT']);
-               $GLOBALS['TYPO3_CONF_VARS']['EXT']['requiredExt'] = '';
-               $GLOBALS['TYPO3_CONF_VARS']['EXT']['extList'] = '';
-               \TYPO3\CMS\Core\Extension\ExtensionManager::extPath('bar');
-       }
-
-       /**
-        * @test
-        */
-       public function extPathSearchesForPathOfExtensionInRequiredExtensionList() {
-               $this->setExpectedException('BadFunctionCallException', '', 1294430951);
-               unset($GLOBALS['TYPO3_LOADED_EXT']);
-               $GLOBALS['TYPO3_CONF_VARS']['EXT']['requiredExt'] = 'foo';
-               $GLOBALS['TYPO3_CONF_VARS']['EXT']['extList'] = '';
-               \TYPO3\CMS\Core\Extension\ExtensionManager::extPath('foo');
-       }
-
-       /**
-        * @test
-        */
-       public function extPathSearchesForPathOfExtensionInExtList() {
-               $this->setExpectedException('BadFunctionCallException', '', 1294430951);
-               unset($GLOBALS['TYPO3_LOADED_EXT']);
-               $GLOBALS['TYPO3_CONF_VARS']['EXT']['requiredExt'] = '';
-               $GLOBALS['TYPO3_CONF_VARS']['EXT']['extListArray'] = array('foo');
-               \TYPO3\CMS\Core\Extension\ExtensionManager::extPath('foo');
-       }
-
-       //////////////////////
-       // Utility functions
-       //////////////////////
-       /**
-        * Generates a basic TCA for a given table.
-        *
-        * @param string $table name of the table, must not be empty
-        * @return array generated TCA for the given table, will not be empty
-        */
-       private function generateTCAForTable($table) {
-               $tca = array();
-               $tca[$table] = array();
-               $tca[$table]['columns'] = array(
-                       'fieldA' => array(),
-                       'fieldC' => array()
-               );
-               $tca[$table]['types'] = array(
-                       'typeA' => array('showitem' => 'fieldA, fieldB, fieldC;labelC;paletteC;specialC, fieldD'),
-                       'typeB' => array('showitem' => 'fieldA, fieldB, fieldC;labelC;paletteC;specialC, fieldD'),
-                       'typeC' => array('showitem' => 'fieldC;;paletteD')
-               );
-               $tca[$table]['palettes'] = array(
-                       'paletteA' => array('showitem' => 'fieldX, fieldY'),
-                       'paletteB' => array('showitem' => 'fieldX, fieldY'),
-                       'paletteC' => array('showitem' => 'fieldX, fieldY'),
-                       'paletteD' => array('showitem' => 'fieldX, fieldY')
-               );
-               return $tca;
-       }
-
-       /**
-        * Returns the fixtures path for this testcase relative to PATH_site.
-        *
-        * @return string the fixtures path for this testcase, will not be empty
-        */
-       private function determineFixturesPath() {
-               return \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('Tx_Phpunit_Service_TestFinder')->getRelativeCoreTestsPath() . 'Unit/t3lib/fixtures/';
-       }
-
-       /////////////////////////////////////////////
-       // Tests concerning getExtensionKeyByPrefix
-       /////////////////////////////////////////////
-       /**
-        * @test
-        * @see t3lib_extMgm::getExtensionKeyByPrefix
-        */
-       public function getExtensionKeyByPrefixForLoadedExtensionWithUnderscoresReturnsExtensionKey() {
-               \TYPO3\CMS\Core\Extension\ExtensionManager::clearExtensionKeyMap();
-               $uniqueSuffix = uniqid('test');
-               $extensionKey = 'tt_news' . $uniqueSuffix;
-               $extensionPrefix = 'tx_ttnews' . $uniqueSuffix;
-               $GLOBALS['TYPO3_LOADED_EXT'][$extensionKey] = array();
-               $this->assertEquals($extensionKey, \TYPO3\CMS\Core\Extension\ExtensionManager::getExtensionKeyByPrefix($extensionPrefix));
-       }
-
-       /**
-        * @test
-        * @see t3lib_extMgm::getExtensionKeyByPrefix
-        */
-       public function getExtensionKeyByPrefixForLoadedExtensionWithoutUnderscoresReturnsExtensionKey() {
-               \TYPO3\CMS\Core\Extension\ExtensionManager::clearExtensionKeyMap();
-               $uniqueSuffix = uniqid('test');
-               $extensionKey = 'kickstarter' . $uniqueSuffix;
-               $extensionPrefix = 'tx_kickstarter' . $uniqueSuffix;
-               $GLOBALS['TYPO3_LOADED_EXT'][$extensionKey] = array();
-               $this->assertEquals($extensionKey, \TYPO3\CMS\Core\Extension\ExtensionManager::getExtensionKeyByPrefix($extensionPrefix));
-       }
-
-       /**
-        * @test
-        * @see t3lib_extMgm::getExtensionKeyByPrefix
-        */
-       public function getExtensionKeyByPrefixForNotLoadedExtensionReturnsFalse() {
-               \TYPO3\CMS\Core\Extension\ExtensionManager::clearExtensionKeyMap();
-               $uniqueSuffix = uniqid('test');
-               $extensionKey = 'unloadedextension' . $uniqueSuffix;
-               $extensionPrefix = 'tx_unloadedextension' . $uniqueSuffix;
-               $this->assertFalse(\TYPO3\CMS\Core\Extension\ExtensionManager::getExtensionKeyByPrefix($extensionPrefix));
-       }
-
-       //////////////////////////////////////
-       // Tests concerning addToAllTCAtypes
-       //////////////////////////////////////
-       /**
-        * Tests whether fields can be add to all TCA types and duplicate fields are considered.
-        *
-        * @test
-        * @see t3lib_extMgm::addToAllTCAtypes()
-        */
-       public function canAddFieldsToAllTCATypesBeforeExistingOnes() {
-               $table = uniqid('tx_coretest_table');
-               $GLOBALS['TCA'] = $this->generateTCAForTable($table);
-               \TYPO3\CMS\Core\Extension\ExtensionManager::addToAllTCAtypes($table, 'newA, newA, newB, fieldA', '', 'before:fieldD');
-               // Checking typeA:
-               $this->assertEquals('fieldA, fieldB, fieldC;labelC;paletteC;specialC, newA, newB, fieldD', $GLOBALS['TCA'][$table]['types']['typeA']['showitem']);
-               // Checking typeB:
-               $this->assertEquals('fieldA, fieldB, fieldC;labelC;paletteC;specialC, newA, newB, fieldD', $GLOBALS['TCA'][$table]['types']['typeB']['showitem']);
-       }
-
-       /**
-        * Tests whether fields can be add to all TCA types and duplicate fields are considered.
-        *
-        * @test
-        * @see t3lib_extMgm::addToAllTCAtypes()
-        */
-       public function canAddFieldsToAllTCATypesAfterExistingOnes() {
-               $table = uniqid('tx_coretest_table');
-               $GLOBALS['TCA'] = $this->generateTCAForTable($table);
-               \TYPO3\CMS\Core\Extension\ExtensionManager::addToAllTCAtypes($table, 'newA, newA, newB, fieldA', '', 'after:fieldC');
-               // Checking typeA:
-               $this->assertEquals('fieldA, fieldB, fieldC;labelC;paletteC;specialC, newA, newB, fieldD', $GLOBALS['TCA'][$table]['types']['typeA']['showitem']);
-               // Checking typeB:
-               $this->assertEquals('fieldA, fieldB, fieldC;labelC;paletteC;specialC, newA, newB, fieldD', $GLOBALS['TCA'][$table]['types']['typeB']['showitem']);
-       }
-
-       /**
-        * Tests whether fields can be add to a TCA type before existing ones
-        *
-        * @test
-        * @see t3lib_extMgm::addToAllTCAtypes()
-        */
-       public function canAddFieldsToTCATypeBeforeExistingOnes() {
-               $table = uniqid('tx_coretest_table');
-               $GLOBALS['TCA'] = $this->generateTCAForTable($table);
-               \TYPO3\CMS\Core\Extension\ExtensionManager::addToAllTCAtypes($table, 'newA, newA, newB, fieldA', 'typeA', 'before:fieldD');
-               // Checking typeA:
-               $this->assertEquals('fieldA, fieldB, fieldC;labelC;paletteC;specialC, newA, newB, fieldD', $GLOBALS['TCA'][$table]['types']['typeA']['showitem']);
-               // Checking typeB:
-               $this->assertEquals('fieldA, fieldB, fieldC;labelC;paletteC;specialC, fieldD', $GLOBALS['TCA'][$table]['types']['typeB']['showitem']);
-       }
-
-       /**
-        * Tests whether fields can be add to a TCA type after existing ones
-        *
-        * @test
-        * @see t3lib_extMgm::addToAllTCAtypes()
-        */
-       public function canAddFieldsToTCATypeAfterExistingOnes() {
-               $table = uniqid('tx_coretest_table');
-               $GLOBALS['TCA'] = $this->generateTCAForTable($table);
-               \TYPO3\CMS\Core\Extension\ExtensionManager::addToAllTCAtypes($table, 'newA, newA, newB, fieldA', 'typeA', 'after:fieldC');
-               // Checking typeA:
-               $this->assertEquals('fieldA, fieldB, fieldC;labelC;paletteC;specialC, newA, newB, fieldD', $GLOBALS['TCA'][$table]['types']['typeA']['showitem']);
-               // Checking typeB:
-               $this->assertEquals('fieldA, fieldB, fieldC;labelC;paletteC;specialC, fieldD', $GLOBALS['TCA'][$table]['types']['typeB']['showitem']);
-       }
-
-       /**
-        * Test wheter replacing other TCA fields works as promissed
-        *
-        * @test
-        * @see t3lib_extMgm::addFieldsToAllPalettesOfField()
-        */
-       public function canAddFieldsToTCATypeAndReplaceExistingOnes() {
-               $table = uniqid('tx_coretest_table');
-               $GLOBALS['TCA'] = $this->generateTCAForTable($table);
-               $typesBefore = $GLOBALS['TCA'][$table]['types'];
-               \TYPO3\CMS\Core\Extension\ExtensionManager::addToAllTCAtypes($table, 'fieldZ', '', 'replace:fieldX');
-               $this->assertEquals($typesBefore, $GLOBALS['TCA'][$table]['types'], 'It\'s wrong that the "types" array changes here - the replaced field is only on palettes');
-               // unchanged because the palette is not used
-               $this->assertEquals('fieldX, fieldY', $GLOBALS['TCA'][$table]['palettes']['paletteA']['showitem']);
-               // unchanged because the palette is not used
-               $this->assertEquals('fieldX, fieldY', $GLOBALS['TCA'][$table]['palettes']['paletteB']['showitem']);
-               $this->assertEquals('fieldZ, fieldY', $GLOBALS['TCA'][$table]['palettes']['paletteC']['showitem']);
-               $this->assertEquals('fieldZ, fieldY', $GLOBALS['TCA'][$table]['palettes']['paletteD']['showitem']);
-       }
-
-       ///////////////////////////////////////////////////
-       // Tests concerning addFieldsToAllPalettesOfField
-       ///////////////////////////////////////////////////
-       /**
-        * Tests whether fields can be added to a palette before existing elements.
-        *
-        * @test
-        * @see t3lib_extMgm::addFieldsToPalette()
-        */
-       public function canAddFieldsToPaletteBeforeExistingOnes() {
-               $table = uniqid('tx_coretest_table');
-               $GLOBALS['TCA'] = $this->generateTCAForTable($table);
-               \TYPO3\CMS\Core\Extension\ExtensionManager::addFieldsToPalette($table, 'paletteA', 'newA, newA, newB, fieldX', 'before:fieldY');
-               $this->assertEquals('fieldX, newA, newB, fieldY', $GLOBALS['TCA'][$table]['palettes']['paletteA']['showitem']);
-       }
-
-       /**
-        * Tests whether fields can be added to a palette after existing elements.
-        *
-        * @test
-        * @see t3lib_extMgm::addFieldsToPalette()
-        */
-       public function canAddFieldsToPaletteAfterExistingOnes() {
-               $table = uniqid('tx_coretest_table');
-               $GLOBALS['TCA'] = $this->generateTCAForTable($table);
-               \TYPO3\CMS\Core\Extension\ExtensionManager::addFieldsToPalette($table, 'paletteA', 'newA, newA, newB, fieldX', 'after:fieldX');
-               $this->assertEquals('fieldX, newA, newB, fieldY', $GLOBALS['TCA'][$table]['palettes']['paletteA']['showitem']);
-       }
-
-       /**
-        * Tests whether fields can be added to a palette after a not existing elements.
-        *
-        * @test
-        * @see t3lib_extMgm::addFieldsToPalette()
-        */
-       public function canAddFieldsToPaletteAfterNotExistingOnes() {
-               $table = uniqid('tx_coretest_table');
-               $GLOBALS['TCA'] = $this->generateTCAForTable($table);
-               \TYPO3\CMS\Core\Extension\ExtensionManager::addFieldsToPalette($table, 'paletteA', 'newA, newA, newB, fieldX', 'after:' . uniqid('notExisting'));
-               $this->assertEquals('fieldX, fieldY, newA, newB', $GLOBALS['TCA'][$table]['palettes']['paletteA']['showitem']);
-       }
-
-       /**
-        * Tests whether fields can be added to all palettes of a regular field before existing ones.
-        *
-        * @test
-        * @see t3lib_extMgm::addFieldsToAllPalettesOfField()
-        */
-       public function canAddFieldsToAllPalettesOfFieldBeforeExistingOnes() {
-               $table = uniqid('tx_coretest_table');
-               $GLOBALS['TCA'] = $this->generateTCAForTable($table);
-               \TYPO3\CMS\Core\Extension\ExtensionManager::addFieldsToAllPalettesOfField($table, 'fieldC', 'newA, newA, newB, fieldX', 'before:fieldY');
-               $this->assertEquals('fieldX, fieldY', $GLOBALS['TCA'][$table]['palettes']['paletteA']['showitem']);
-               $this->assertEquals('fieldX, fieldY', $GLOBALS['TCA'][$table]['palettes']['paletteB']['showitem']);
-               $this->assertEquals('fieldX, newA, newB, fieldY', $GLOBALS['TCA'][$table]['palettes']['paletteC']['showitem']);
-               $this->assertEquals('fieldX, newA, newB, fieldY', $GLOBALS['TCA'][$table]['palettes']['paletteD']['showitem']);
-       }
-
-       /**
-        * Tests whether fields can be added to all palettes of a regular field after existing ones.
-        *
-        * @test
-        * @see t3lib_extMgm::addFieldsToAllPalettesOfField()
-        */
-       public function canAddFieldsToAllPalettesOfFieldAfterExistingOnes() {
-               $table = uniqid('tx_coretest_table');
-               $GLOBALS['TCA'] = $this->generateTCAForTable($table);
-               \TYPO3\CMS\Core\Extension\ExtensionManager::addFieldsToAllPalettesOfField($table, 'fieldC', 'newA, newA, newB, fieldX', 'after:fieldX');
-               $this->assertEquals('fieldX, fieldY', $GLOBALS['TCA'][$table]['palettes']['paletteA']['showitem']);
-               $this->assertEquals('fieldX, fieldY', $GLOBALS['TCA'][$table]['palettes']['paletteB']['showitem']);
-               $this->assertEquals('fieldX, newA, newB, fieldY', $GLOBALS['TCA'][$table]['palettes']['paletteC']['showitem']);
-               $this->assertEquals('fieldX, newA, newB, fieldY', $GLOBALS['TCA'][$table]['palettes']['paletteD']['showitem']);
-       }
-
-       /**
-        * Tests whether fields can be added to all palettes of a regular field after a not existing field.
-        *
-        * @test
-        * @see t3lib_extMgm::addFieldsToAllPalettesOfField()
-        */
-       public function canAddFieldsToAllPalettesOfFieldAfterNotExistingOnes() {
-               $table = uniqid('tx_coretest_table');
-               $GLOBALS['TCA'] = $this->generateTCAForTable($table);
-               \TYPO3\CMS\Core\Extension\ExtensionManager::addFieldsToAllPalettesOfField($table, 'fieldC', 'newA, newA, newB, fieldX', 'after:' . uniqid('notExisting'));
-               $this->assertEquals('fieldX, fieldY', $GLOBALS['TCA'][$table]['palettes']['paletteA']['showitem']);
-               $this->assertEquals('fieldX, fieldY', $GLOBALS['TCA'][$table]['palettes']['paletteB']['showitem']);
-               $this->assertEquals('fieldX, fieldY, newA, newB', $GLOBALS['TCA'][$table]['palettes']['paletteC']['showitem']);
-               $this->assertEquals('fieldX, fieldY, newA, newB', $GLOBALS['TCA'][$table]['palettes']['paletteD']['showitem']);
-       }
-
-       /**
-        * Tests whether fields are added to a new palette that did not exist before.
-        *
-        * @test
-        * @see t3lib_extMgm::addFieldsToAllPalettesOfField()
-        */
-       public function canAddFieldsToAllPalettesOfFieldWithoutPaletteExistingBefore() {
-               $table = uniqid('tx_coretest_table');
-               $GLOBALS['TCA'] = $this->generateTCAForTable($table);
-               \TYPO3\CMS\Core\Extension\ExtensionManager::addFieldsToAllPalettesOfField($table, 'fieldA', 'newA, newA, newB, fieldX');
-               $this->assertEquals('fieldX, fieldY', $GLOBALS['TCA'][$table]['palettes']['paletteA']['showitem']);
-               $this->assertEquals('fieldX, fieldY', $GLOBALS['TCA'][$table]['palettes']['paletteB']['showitem']);
-               $this->assertEquals('fieldX, fieldY', $GLOBALS['TCA'][$table]['palettes']['paletteC']['showitem']);
-               $this->assertEquals('fieldX, fieldY', $GLOBALS['TCA'][$table]['palettes']['paletteD']['showitem']);
-               $this->assertEquals('newA, newB, fieldX', $GLOBALS['TCA'][$table]['palettes']['generatedFor-fieldA']['showitem']);
-       }
-
-       /////////////////////////////////////////
-       // Tests concerning addTcaSelectItem
-       /////////////////////////////////////////
-       /**
-        * @test
-        * @expectedException InvalidArgumentException
-        */
-       public function addTcaSelectItemThrowsExceptionIfTableIsNotOfTypeString() {
-               \TYPO3\CMS\Core\Extension\ExtensionManager::addTcaSelectItem(array(), 'foo', array());
-       }
-
-       /**
-        * @test
-        * @expectedException InvalidArgumentException
-        */
-       public function addTcaSelectItemThrowsExceptionIfFieldIsNotOfTypeString() {
-               \TYPO3\CMS\Core\Extension\ExtensionManager::addTcaSelectItem('foo', array(), array());
-       }
-
-       /**
-        * @test
-        * @expectedException InvalidArgumentException
-        */
-       public function addTcaSelectItemThrowsExceptionIfRelativeToFieldIsNotOfTypeString() {
-               \TYPO3\CMS\Core\Extension\ExtensionManager::addTcaSelectItem('foo', 'bar', array(), array());
-       }
-
-       /**
-        * @test
-        * @expectedException InvalidArgumentException
-        */
-       public function addTcaSelectItemThrowsExceptionIfRelativePositionIsNotOfTypeString() {
-               \TYPO3\CMS\Core\Extension\ExtensionManager::addTcaSelectItem('foo', 'bar', array(), 'foo', array());
-       }
-
-       /**
-        * @test
-        * @expectedException InvalidArgumentException
-        */
-       public function addTcaSelectItemThrowsExceptionIfRelativePositionIsNotOneOfValidKeywords() {
-               \TYPO3\CMS\Core\Extension\ExtensionManager::addTcaSelectItem('foo', 'bar', array(), 'foo', 'not allowed keyword');
-       }
-
-       /**
-        * @test
-        * @expectedException RuntimeException
-        */
-       public function addTcaSelectItemThrowsExceptionIfFieldIsNotFoundInTca() {
-               $GLOBALS['TCA'] = array();
-               \TYPO3\CMS\Core\Extension\ExtensionManager::addTcaSelectItem('foo', 'bar', array());
-       }
-
-       /**
-        * Data provider for addTcaSelectItemInsertsItemAtSpecifiedPosition
-        */
-       public function addTcaSelectItemDataProvider() {
-               // Every array splits into:
-               // - relativeToField
-               // - relativePosition
-               // - expectedResultArray
-               return array(
-                       'add at end of array' => array(
-                               '',
-                               '',
-                               array(
-                                       0 => array('firstElement'),
-                                       1 => array('matchMe'),
-                                       2 => array('thirdElement'),
-                                       3 => array('insertedElement')
-                               )
-                       ),
-                       'replace element' => array(
-                               'matchMe',
-                               'replace',
-                               array(
-                                       0 => array('firstElement'),
-                                       1 => array('insertedElement'),
-                                       2 => array('thirdElement')
-                               )
-                       ),
-                       'add element after' => array(
-                               'matchMe',
-                               'after',
-                               array(
-                                       0 => array('firstElement'),
-                                       1 => array('matchMe'),
-                                       2 => array('insertedElement'),
-                                       3 => array('thirdElement')
-                               )
-                       ),
-                       'add element before' => array(
-                               'matchMe',
-                               'before',
-                               array(
-                                       0 => array('firstElement'),
-                                       1 => array('insertedElement'),
-                                       2 => array('matchMe'),
-                                       3 => array('thirdElement')
-                               )
-                       ),
-                       'add at end if relative position was not found' => array(
-                               'notExistingItem',
-                               'after',
-                               array(
-                                       0 => array('firstElement'),
-                                       1 => array('matchMe'),
-                                       2 => array('thirdElement'),
-                                       3 => array('insertedElement')
-                               )
-                       )
-               );
-       }
-
-       /**
-        * @test
-        * @dataProvider addTcaSelectItemDataProvider
-        */
-       public function addTcaSelectItemInsertsItemAtSpecifiedPosition($relativeToField, $relativePosition, $expectedResultArray) {
-               $GLOBALS['TCA'] = array(
-                       'testTable' => array(
-                               'columns' => array(
-                                       'testField' => array(
-                                               'config' => array(
-                                                       'items' => array(
-                                                               '0' => array('firstElement'),
-                                                               '1' => array('matchMe'),
-                                                               2 => array('thirdElement')
-                                                       )
-                                               )
-                                       )
-                               )
-                       )
-               );
-               \TYPO3\CMS\Core\Extension\ExtensionManager::addTcaSelectItem('testTable', 'testField', array('insertedElement'), $relativeToField, $relativePosition);
-               $this->assertEquals($expectedResultArray, $GLOBALS['TCA']['testTable']['columns']['testField']['config']['items']);
-       }
-
-       /////////////////////////////////////////
-       // Tests concerning loadTypo3LoadedExtensionInformation
-       /////////////////////////////////////////
-       /**
-        * @test
-        */
-       public function loadTypo3LoadedExtensionInformationDoesNotCallCacheIfCachingIsDenied() {
-               $GLOBALS['typo3CacheManager'] = $this->getMock('TYPO3\\CMS\\Core\\Cache\\CacheManager', array('getCache'));
-               $GLOBALS['typo3CacheManager']->expects($this->never())->method('getCache');
-               \TYPO3\CMS\Core\Extension\ExtensionManager::loadTypo3LoadedExtensionInformation(FALSE);
-       }
-
-       /**
-        * @test
-        */
-       public function loadTypo3LoadedExtensionInformationRequiresCacheFileIfExistsAndCachingIsAllowed() {
-               $mockCache = $this->getMock('TYPO3\\CMS\\Core\\Cache\\Frontend\\AbstractFrontend', array('getIdentifier', 'set', 'get', 'getByTag', 'has', 'remove', 'flush', 'flushByTag', 'requireOnce'), array(), '', FALSE);
-               $GLOBALS['typo3CacheManager'] = $this->getMock('TYPO3\\CMS\\Core\\Cache\\CacheManager', array('getCache'));
-               $GLOBALS['typo3CacheManager']->expects($this->any())->method('getCache')->will($this->returnValue($mockCache));
-               $mockCache->expects($this->any())->method('has')->will($this->returnValue(TRUE));
-               $mockCache->expects($this->once())->method('requireOnce');
-               \TYPO3\CMS\Core\Extension\ExtensionManager::loadTypo3LoadedExtensionInformation(TRUE);
-       }
-
-       /**
-        * @test
-        */
-       public function loadTypo3LoadedExtensionInformationSetsNewCacheEntryIfCacheFileDoesNotExistAndCachingIsAllowed() {
-               $mockCache = $this->getMock('TYPO3\\CMS\\Core\\Cache\\Frontend\\AbstractFrontend', array('getIdentifier', 'set', 'get', 'getByTag', 'has', 'remove', 'flush', 'flushByTag', 'requireOnce'), array(), '', FALSE);
-               $GLOBALS['typo3CacheManager'] = $this->getMock('TYPO3\\CMS\\Core\\Cache\\CacheManager', array('getCache'));
-               $GLOBALS['typo3CacheManager']->expects($this->any())->method('getCache')->will($this->returnValue($mockCache));
-               $mockCache->expects($this->any())->method('has')->will($this->returnValue(FALSE));
-               $mockCache->expects($this->once())->method('set');
-               \TYPO3\CMS\Core\Extension\ExtensionManager::loadTypo3LoadedExtensionInformation(TRUE);
-       }
-
-       /**
-        * @test
-        */
-       public function loadTypo3LoadedExtensionInformationSetsNewCacheEntryWithNoTags() {
-               $mockCache = $this->getMock('TYPO3\\CMS\\Core\\Cache\\Frontend\\AbstractFrontend', array('getIdentifier', 'set', 'get', 'getByTag', 'has', 'remove', 'flush', 'flushByTag', 'requireOnce'), array(), '', FALSE);
-               $GLOBALS['typo3CacheManager'] = $this->getMock('TYPO3\\CMS\\Core\\Cache\\CacheManager', array('getCache'));
-               $GLOBALS['typo3CacheManager']->expects($this->any())->method('getCache')->will($this->returnValue($mockCache));
-               $mockCache->expects($this->any())->method('has')->will($this->returnValue(FALSE));
-               $mockCache->expects($this->once())->method('set')->with($this->anything(), $this->anything(), $this->equalTo(array()));
-               \TYPO3\CMS\Core\Extension\ExtensionManager::loadTypo3LoadedExtensionInformation(TRUE);
-       }
-
-       /////////////////////////////////////////
-       // Tests concerning createTypo3LoadedExtensionInformationArray
-       /////////////////////////////////////////
-       /**
-        * Data provider for createTypo3LoadedExtensionInformationArrayReturnsExpectedInformationForCmsExtension
-        *
-        * @return array
-        */
-       public function createTypo3LoadedExtensionInformationArrayReturnsExpectedInformationForCmsExtensionDataProvider() {
-               return array(
-                       'System extension' => array('type', 'S'),
-                       'Site relative path' => array('siteRelPath', 'typo3/sysext/cms/'),
-                       'Typo3 relative path' => array('typo3RelPath', 'sysext/cms/'),
-                       'Path ext_localconf.php' => array('ext_localconf.php', '/typo3/sysext/cms/ext_localconf.php'),
-                       'Path ext_tables.php' => array('ext_tables.php', '/typo3/sysext/cms/ext_tables.php'),
-                       'Path ext_tablps.sql' => array('ext_tables.sql', '/typo3/sysext/cms/ext_tables.sql')
-               );
-       }
-
-       /**
-        * @param string $arrayKeyToTest
-        * @param string $expectedContent
-        * @test
-        * @dataProvider createTypo3LoadedExtensionInformationArrayReturnsExpectedInformationForCmsExtensionDataProvider
-        */
-       public function createTypo3LoadedExtensionInformationArrayReturnsExpectedInformationForCmsExtension($arrayKeyToTest, $expectedContent) {
-               $actualArray = \TYPO3\CMS\Core\Extension\ExtensionManagerAccessibleProxy::createTypo3LoadedExtensionInformationArray();
-               $this->assertStringEndsWith($expectedContent, $actualArray['cms'][$arrayKeyToTest]);
-       }
-
-       /////////////////////////////////////////
-       // Tests concerning getTypo3LoadedExtensionInformationCacheIdentifier
-       /////////////////////////////////////////
-       /**
-        * @test
-        */
-       public function getTypo3LoadedExtensionInformationCacheIdentifierCreatesSha1WithFourtyCharactersAndPrefix() {
-               $prefix = 'loaded_extensions_';
-               $identifier = \TYPO3\CMS\Core\Extension\ExtensionManagerAccessibleProxy::getTypo3LoadedExtensionInformationCacheIdentifier();
-               $this->assertStringStartsWith($prefix, $identifier);
-               $sha1 = str_replace($prefix, '', $identifier);
-               $this->assertEquals(40, strlen($sha1));
-       }
-
-       /////////////////////////////////////////
-       // Tests concerning loadExtLocalconf
-       /////////////////////////////////////////
-       /**
-        * @test
-        */
-       public function loadExtLocalconfDoesNotReadFromCacheIfCachingIsDenied() {
-               $GLOBALS['typo3CacheManager'] = $this->getMock('TYPO3\\CMS\\Core\\Cache\\CacheManager', array('getCache'));
-               $GLOBALS['typo3CacheManager']->expects($this->never())->method('getCache');
-               \TYPO3\CMS\Core\Extension\ExtensionManager::loadExtLocalconf(FALSE);
-       }
-
-       /**
-      &n