public function TestDrupalSqlBase::setDatabase in Drupal 8
Same name and namespace in other branches
- 9 core/modules/migrate_drupal/tests/src/Unit/source/DrupalSqlBaseTest.php \Drupal\Tests\migrate_drupal\Unit\source\TestDrupalSqlBase::setDatabase()
- 10 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 117
Class
- TestDrupalSqlBase
- Extends the DrupalSqlBase abstract class.
Namespace
Drupal\Tests\migrate_drupal\Unit\sourceCode
public function setDatabase(Connection $database) {
$this->database = $database;
}