You are here

protected function MigrateTestBase::setUp in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/migrate/tests/src/Kernel/MigrateTestBase.php \Drupal\Tests\migrate\Kernel\MigrateTestBase::setUp()
  2. 9 core/modules/migrate/tests/src/Kernel/MigrateTestBase.php \Drupal\Tests\migrate\Kernel\MigrateTestBase::setUp()
4 methods override MigrateTestBase::setUp()
EntityRevisionTest::setUp in core/modules/migrate/tests/src/Kernel/Plugin/EntityRevisionTest.php
MigrateUserAdminPassTest::setUp in core/modules/user/tests/src/Kernel/Migrate/MigrateUserAdminPassTest.php
MigrationSourceCacheTest::setUp in core/modules/migrate/tests/src/Kernel/Plugin/source/MigrationSourceCacheTest.php
SqlTest::setUp in core/modules/migrate/tests/src/Kernel/Plugin/id_map/SqlTest.php

File

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

Class

MigrateTestBase
Creates abstract base class for migration tests.

Namespace

Drupal\Tests\migrate\Kernel

Code

protected function setUp() : void {
  parent::setUp();
  $this
    ->createMigrationConnection();
  $this->sourceDatabase = Database::getConnection('default', 'migrate');

  // Attach the original test prefix as a database, for SQLite to attach its
  // database file.
  $this->sourceDatabase
    ->attachDatabase(substr($this->sourceDatabase
    ->getConnectionOptions()['prefix'], 0, -1));
}