function TestDrupalSqlBase::setDatabase

Same name in other branches
  1. 8.9.x core/modules/migrate_drupal/tests/src/Unit/source/DrupalSqlBaseTest.php \Drupal\Tests\migrate_drupal\Unit\source\TestDrupalSqlBase::setDatabase()
  2. 10 core/modules/migrate_drupal/tests/src/Unit/source/DrupalSqlBaseTest.php \Drupal\Tests\migrate_drupal\Unit\source\TestDrupalSqlBase::setDatabase()
  3. 11.x 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;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.