function TestSqlBase::setDatabase

Same name in other branches
  1. 8.9.x core/modules/migrate/tests/src/Unit/SqlBaseTest.php \Drupal\Tests\migrate\Unit\TestSqlBase::setDatabase()
  2. 10 core/modules/migrate/tests/src/Unit/SqlBaseTest.php \Drupal\Tests\migrate\Unit\TestSqlBase::setDatabase()
  3. 11.x core/modules/migrate/tests/src/Unit/SqlBaseTest.php \Drupal\Tests\migrate\Unit\TestSqlBase::setDatabase()

Allows us to set the database during tests.

Parameters

mixed $database: The database mock object.

File

core/modules/migrate/tests/src/Unit/SqlBaseTest.php, line 175

Class

TestSqlBase
Creates a base source class for SQL migration testing.

Namespace

Drupal\Tests\migrate\Unit

Code

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

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