[TASK] Clean up testing framework from core deps - part 1 06/51706/6
authorBenni Mack <benni@typo3.org>
Wed, 15 Feb 2017 17:24:57 +0000 (18:24 +0100)
committerSusanne Moog <susanne.moog@typo3.org>
Thu, 16 Feb 2017 07:31:40 +0000 (08:31 +0100)
There are some unnecessary calls to the core,
which are obviously unneeded.

Resolves: #79843
Releases: master
Change-Id: Ia86f57e56516cc30132a2360d8dc17a44e95531e
Reviewed-on: https://review.typo3.org/51706
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
Reviewed-by: Susanne Moog <susanne.moog@typo3.org>
Tested-by: Susanne Moog <susanne.moog@typo3.org>
components/testing_framework/Classes/Core/BaseTestCase.php
components/testing_framework/Classes/Core/Functional/FunctionalTestCase.php
components/testing_framework/Classes/Core/Testbase.php

index 86299d0..8f075d1 100644 (file)
@@ -14,8 +14,6 @@ namespace TYPO3\Components\TestingFramework\Core;
  * The TYPO3 project - inspiring people to share!
  */
 
-use TYPO3\CMS\Core\Utility\StringUtility;
-
 /**
  * The mother of all test cases.
  *
@@ -295,6 +293,7 @@ abstract class BaseTestCase extends \PHPUnit_Framework_TestCase
      */
     protected function getUniqueId($prefix = '')
     {
-        return $prefix . StringUtility::getUniqueId(mt_rand());
+        $uniqueId = uniqid(mt_rand(), true);
+        return $prefix . str_replace('.', '', $uniqueId);
     }
 }
index 9f9b2a1..c81b65b 100644 (file)
@@ -16,7 +16,6 @@ namespace TYPO3\Components\TestingFramework\Core\Functional;
 
 use TYPO3\CMS\Core\Authentication\BackendUserAuthentication;
 use TYPO3\CMS\Core\Cache\Backend\NullBackend;
-use TYPO3\CMS\Core\Core\Bootstrap;
 use TYPO3\CMS\Core\Database\ConnectionPool;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\Components\TestingFramework\Core\BaseTestCase;
index 8673e03..7eb6107 100644 (file)
@@ -402,8 +402,8 @@ class Testbase
     {
         // Base of final LocalConfiguration is core factory configuration
         $finalConfigurationArray = require ORIGINAL_ROOT . 'typo3/sysext/core/Configuration/FactoryConfiguration.php';
-        ArrayUtility::mergeRecursiveWithOverrule($finalConfigurationArray, $configuration);
-        ArrayUtility::mergeRecursiveWithOverrule($finalConfigurationArray, $overruleConfiguration);
+        $finalConfigurationArray = array_replace_recursive($finalConfigurationArray, $configuration);
+        $finalConfigurationArray = array_replace_recursive($finalConfigurationArray, $overruleConfiguration);
         $result = $this->writeFile(
             $instancePath . '/typo3conf/LocalConfiguration.php',
             '<?php' . chr(10) .