function DriverSpecificConnectionUnitTestBase::getConnectionId
Same name in other branches
- 10 core/tests/Drupal/KernelTests/Core/Database/DriverSpecificConnectionUnitTestBase.php \Drupal\KernelTests\Core\Database\DriverSpecificConnectionUnitTestBase::getConnectionId()
- 11.x core/tests/Drupal/KernelTests/Core/Database/DriverSpecificConnectionUnitTestBase.php \Drupal\KernelTests\Core\Database\DriverSpecificConnectionUnitTestBase::getConnectionId()
Returns the connection ID of the current test connection.
Return value
int
1 call to DriverSpecificConnectionUnitTestBase::getConnectionId()
- DriverSpecificConnectionUnitTestBase::setUp in core/
tests/ Drupal/ KernelTests/ Core/ Database/ DriverSpecificConnectionUnitTestBase.php
File
-
core/
tests/ Drupal/ KernelTests/ Core/ Database/ DriverSpecificConnectionUnitTestBase.php, line 67
Class
- DriverSpecificConnectionUnitTestBase
- Tests management of database connections.
Namespace
Drupal\KernelTests\Core\DatabaseCode
protected function getConnectionId() : int {
return (int) Database::getConnection(static::TEST_TARGET_CONNECTION)->query($this->getQuery()['connection_id'])
->fetchField();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.