[BUGFIX] Side effects from LocalConfiguration in acceptance tests
[Packages/TYPO3.CMS.git] / typo3 / sysext / core / Classes / Tests / Testbase.php
index ef84a7b..f351bc1 100644 (file)
@@ -284,7 +284,7 @@ class Testbase
             if (!file_exists($sourcePath)) {
                 throw new Exception(
                     'Path ' . $sourcePath . ' not found',
-                    1376745645
+                    1476109221
                 );
             }
             $destinationPath = $instancePath . '/' . ltrim($destinationPathToLinkInTestInstance, '/');
@@ -355,7 +355,7 @@ class Testbase
                 1397406356
             );
         }
-        return $originalConfigurationArray;
+        return $originalConfigurationArray['DB'];
     }
 
     /**
@@ -629,14 +629,15 @@ class Testbase
             }
 
             $tableName = $table->getName();
-            $connection = (new ConnectionPool())->getConnectionForTable($tableName);
+            $connection = GeneralUtility::makeInstance(ConnectionPool::class)
+                ->getConnectionForTable($tableName);
             $connection->insert(
                 $tableName,
                 $insertArray
             );
             if (isset($table['id'])) {
                 $elementId = (string)$table['id'];
-                $foreignKeys[$tableName][$elementId] = $connection->lastInsertId();
+                $foreignKeys[$tableName][$elementId] = $connection->lastInsertId($tableName);
             }
         }
     }