You are here

protected function MigrateUpgradeTestBase::loadFixture in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/migrate_drupal_ui/tests/src/Functional/MigrateUpgradeTestBase.php \Drupal\Tests\migrate_drupal_ui\Functional\MigrateUpgradeTestBase::loadFixture()
  2. 9 core/modules/migrate_drupal_ui/tests/src/Functional/MigrateUpgradeTestBase.php \Drupal\Tests\migrate_drupal_ui\Functional\MigrateUpgradeTestBase::loadFixture()

Loads a database fixture into the source database connection.

Parameters

string $path: Path to the dump file.

5 calls to MigrateUpgradeTestBase::loadFixture()
NodeClassicTest::setUp in core/modules/migrate_drupal_ui/tests/src/Functional/d6/NodeClassicTest.php
NoMultilingualReviewPageTest::setUp in core/modules/rdf/tests/src/Functional/Migrate/NoMultilingualReviewPageTest.php
NoMultilingualReviewPageTest::setUp in core/modules/migrate_drupal_ui/tests/src/Functional/d6/NoMultilingualReviewPageTest.php
ReviewPageTest::setUp in core/modules/tracker/tests/src/Functional/Migrate/ReviewPageTest.php
Upgrade7Test::setUp in core/modules/rdf/tests/src/Functional/Migrate/Upgrade7Test.php

File

core/modules/migrate_drupal_ui/tests/src/Functional/MigrateUpgradeTestBase.php, line 81

Class

MigrateUpgradeTestBase
Provides a base class for testing migration upgrades in the UI.

Namespace

Drupal\Tests\migrate_drupal_ui\Functional

Code

protected function loadFixture($path) {
  $default_db = Database::getConnection()
    ->getKey();
  Database::setActiveConnection($this->sourceDatabase
    ->getKey());
  if (substr($path, -3) == '.gz') {
    $path = 'compress.zlib://' . $path;
  }
  require $path;
  Database::setActiveConnection($default_db);
}