You are here

public static function TestSetupTrait::getDatabaseConnection in Drupal 9

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Test/TestSetupTrait.php \Drupal\Core\Test\TestSetupTrait::getDatabaseConnection()

Returns the database connection to the site running Simpletest.

Return value

\Drupal\Core\Database\Connection The database connection to use for inserting assertions.

File

core/lib/Drupal/Core/Test/TestSetupTrait.php, line 112

Class

TestSetupTrait
Provides a trait for shared test setup functionality.

Namespace

Drupal\Core\Test

Code

public static function getDatabaseConnection() {
  return TestDatabase::getConnection();
}