1.20.x database_test.test protected ConnectionUnitTest::getConnectionID()

Returns the connection ID of the current test connection.

Return value

integer:

File

modules/simpletest/tests/database_test.test, line 3964
Database tests.

Class

ConnectionUnitTest
Tests management of database connections.

Code

protected function getConnectionID() {
  return (int) Database::getConnection($this->target, $this->key)->query('SELECT CONNECTION_ID()')->fetchField();
}