public static function TestSetupTrait::getDatabaseConnection in Drupal 10
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Test/TestSetupTrait.php \Drupal\Core\Test\TestSetupTrait::getDatabaseConnection()
- 9 core/lib/Drupal/Core/Test/TestSetupTrait.php \Drupal\Core\Test\TestSetupTrait::getDatabaseConnection()
Returns the database connection to the site under test.
Return value
\Drupal\Core\Database\Connection The database connection to use for inserting assertions.
1 call to TestSetupTrait::getDatabaseConnection()
- StatusTest::testStatusPage in core/
modules/ system/ tests/ src/ Functional/ System/ StatusTest.php - Tests that the status page returns.
File
- core/
lib/ Drupal/ Core/ Test/ TestSetupTrait.php, line 109
Class
- TestSetupTrait
- Provides a trait for shared test setup functionality.
Namespace
Drupal\Core\TestCode
public static function getDatabaseConnection() {
return TestDatabase::getConnection();
}