protected function ConnectionUnitTest::getConnectionId in Drupal 10
Same name and namespace in other branches
- 8 core/tests/Drupal/KernelTests/Core/Database/ConnectionUnitTest.php \Drupal\KernelTests\Core\Database\ConnectionUnitTest::getConnectionId()
- 9 core/tests/Drupal/KernelTests/Core/Database/ConnectionUnitTest.php \Drupal\KernelTests\Core\Database\ConnectionUnitTest::getConnectionId()
Returns the connection ID of the current test connection.
Return value
int
File
- core/
tests/ Drupal/ KernelTests/ Core/ Database/ ConnectionUnitTest.php, line 89
Class
- ConnectionUnitTest
- Tests management of database connections.
Namespace
Drupal\KernelTests\Core\DatabaseCode
protected function getConnectionId() {
return (int) Database::getConnection(static::TEST_TARGET_CONNECTION)
->query($this
->getQuery()['connection_id'])
->fetchField();
}