You are here

private function MigrateTestBase::cleanupMigrateConnection in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/migrate/tests/src/Kernel/MigrateTestBase.php \Drupal\Tests\migrate\Kernel\MigrateTestBase::cleanupMigrateConnection()

Cleans up the test migrate connection.

@todo Remove when we don't use global. https://www.drupal.org/node/2552791

1 call to MigrateTestBase::cleanupMigrateConnection()
MigrateTestBase::tearDown in core/modules/migrate/tests/src/Kernel/MigrateTestBase.php

File

core/modules/migrate/tests/src/Kernel/MigrateTestBase.php, line 121

Class

MigrateTestBase
Creates abstract base class for migration tests.

Namespace

Drupal\Tests\migrate\Kernel

Code

private function cleanupMigrateConnection() {
  Database::removeConnection('migrate');
  $original_connection_info = Database::getConnectionInfo('simpletest_original_migrate');
  if ($original_connection_info) {
    Database::renameConnection('simpletest_original_migrate', 'migrate');
  }
}