1.20.x database_test.test protected ConnectionUnitTest::assertConnection($id)

Asserts that a connection ID exists.

Parameters

integer $id: The connection ID to verify.

File

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

Class

ConnectionUnitTest
Tests management of database connections.

Code

protected function assertConnection($id) {
  $list = $this->monitor->query('SHOW PROCESSLIST')->fetchAllKeyed(0, 0);
  return $this->assertTrue(isset($list[$id]), format_string('Connection ID @id found.', array('@id' => $id)));
}