function TestSetupTrait::getDatabaseConnection
Same name in other branches
- 8.9.x core/lib/Drupal/Core/Test/TestSetupTrait.php \Drupal\Core\Test\TestSetupTrait::getDatabaseConnection()
- 10 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 126
Class
- TestSetupTrait
- Provides a trait for shared test setup functionality.
Namespace
Drupal\Core\TestCode
public static function getDatabaseConnection() {
return TestDatabase::getConnection();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.