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