You are here

public function TestDrupalSqlBase::setDatabase in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/migrate_drupal/tests/src/Unit/source/DrupalSqlBaseTest.php \Drupal\Tests\migrate_drupal\Unit\source\TestDrupalSqlBase::setDatabase()
  2. 9 core/modules/migrate_drupal/tests/src/Unit/source/DrupalSqlBaseTest.php \Drupal\Tests\migrate_drupal\Unit\source\TestDrupalSqlBase::setDatabase()

Tweaks DrupalSqlBase to set a new database connection for tests.

Parameters

\Drupal\Core\Database\Connection $database: The new connection to use.

See also

\Drupal\Tests\migrate\Unit\MigrateSourceSqlTestCase

File

core/modules/migrate_drupal/tests/src/Unit/source/DrupalSqlBaseTest.php, line 198

Class

TestDrupalSqlBase
Extends the DrupalSqlBase abstract class.

Namespace

Drupal\Tests\migrate_drupal\Unit\source

Code

public function setDatabase(Connection $database) {
  $this->database = $database;
}