function MigrateMissingDatabaseTest::setUp
Same name in this branch
- 11.x core/modules/migrate_drupal/tests/src/Kernel/MigrateMissingDatabaseTest.php \Drupal\Tests\migrate_drupal\Kernel\MigrateMissingDatabaseTest::setUp()
Same name in other branches
- 10 core/modules/migrate_drupal/tests/src/Kernel/MigrateMissingDatabaseTest.php \Drupal\Tests\migrate_drupal\Kernel\MigrateMissingDatabaseTest::setUp()
- 10 core/modules/migrate/tests/src/Kernel/MigrateMissingDatabaseTest.php \Drupal\Tests\migrate\Kernel\MigrateMissingDatabaseTest::setUp()
Overrides KernelTestBase::setUp
File
-
core/
modules/ migrate/ tests/ src/ Kernel/ MigrateMissingDatabaseTest.php, line 35
Class
- MigrateMissingDatabaseTest
- Tests that a SQL migration can be instantiated without a database connection.
Namespace
Drupal\Tests\migrate\KernelCode
protected function setUp() : void {
parent::setUp();
$this->migrationPluginManager = \Drupal::service('plugin.manager.migration');
// Set the 'migrate' database connection to use a missing database.
$info = Database::getConnectionInfo('default')['default'];
$info['database'] = 'godot';
Database::addConnectionInfo('migrate', 'default', $info);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.