function MigrateUpgradeTestBase::loadFixture

Same name in other branches
  1. 9 core/modules/migrate_drupal_ui/tests/src/Functional/MigrateUpgradeTestBase.php \Drupal\Tests\migrate_drupal_ui\Functional\MigrateUpgradeTestBase::loadFixture()
  2. 8.9.x core/modules/migrate_drupal_ui/tests/src/Functional/MigrateUpgradeTestBase.php \Drupal\Tests\migrate_drupal_ui\Functional\MigrateUpgradeTestBase::loadFixture()
  3. 10 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.

24 calls to MigrateUpgradeTestBase::loadFixture()
CredentialFormTest::testCredentialFrom in core/modules/migrate_drupal_ui/tests/src/Functional/CredentialFormTest.php
Test the credential form.
DoubleSlashTest::setUp in core/modules/migrate_drupal_ui/tests/src/Functional/d7/DoubleSlashTest.php
FilePathTest::setUp in core/modules/migrate_drupal_ui/tests/src/Functional/d7/FilePathTest.php
IdConflictTest::setUp in core/modules/migrate_drupal_ui/tests/src/Functional/d7/IdConflictTest.php
IdConflictTest::setUp in core/modules/migrate_drupal_ui/tests/src/Functional/d6/IdConflictTest.php

... See full list

File

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

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 (str_ends_with($path, '.gz')) {
        $path = 'compress.zlib://' . $path;
    }
    require $path;
    Database::setActiveConnection($default_db);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.