protected function MigrateUpgradeTestBase::loadFixture in Migrate Upgrade 8
Loads a database fixture into the source database connection.
Parameters
string $path: Path to the dump file.
2 calls to MigrateUpgradeTestBase::loadFixture()
- MigrateUpgrade6Test::setUp in src/
Tests/ d6/ MigrateUpgrade6Test.php - Sets up a Drupal site for running functional and integration tests.
- MigrateUpgrade7Test::setUp in src/
Tests/ d7/ MigrateUpgrade7Test.php - Sets up a Drupal site for running functional and integration tests.
File
- src/
Tests/ MigrateUpgradeTestBase.php, line 56 - Contains \Drupal\migrate_upgrade\Tests\MigrateUpgradeTestBase.
Class
- MigrateUpgradeTestBase
- Provides a base class for testing migration upgrades in the UI.
Namespace
Drupal\migrate_upgrade\TestsCode
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);
}