protected function ConnectionUnitTest::assertNoConnection in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/system/src/Tests/Database/ConnectionUnitTest.php \Drupal\system\Tests\Database\ConnectionUnitTest::assertNoConnection()
Asserts that a connection ID does not exist.
Parameters
integer $id: The connection ID to verify.
4 calls to ConnectionUnitTest::assertNoConnection()
- ConnectionUnitTest::testOpenClose in core/
modules/ system/ src/ Tests/ Database/ ConnectionUnitTest.php - Tests Database::closeConnection() without query.
- ConnectionUnitTest::testOpenQueryClose in core/
modules/ system/ src/ Tests/ Database/ ConnectionUnitTest.php - Tests Database::closeConnection() with a query.
- ConnectionUnitTest::testOpenQueryPrefetchClose in core/
modules/ system/ src/ Tests/ Database/ ConnectionUnitTest.php - Tests Database::closeConnection() with a query and custom prefetch method.
- ConnectionUnitTest::testOpenSelectQueryClose in core/
modules/ system/ src/ Tests/ Database/ ConnectionUnitTest.php - Tests Database::closeConnection() with a select query.
File
- core/
modules/ system/ src/ Tests/ Database/ ConnectionUnitTest.php, line 92 - Contains \Drupal\system\Tests\Database\ConnectionUnitTest.
Class
- ConnectionUnitTest
- Tests management of database connections.
Namespace
Drupal\system\Tests\DatabaseCode
protected function assertNoConnection($id) {
$list = $this->monitor
->query('SHOW PROCESSLIST')
->fetchAllKeyed(0, 0);
return $this
->assertFalse(isset($list[$id]), format_string('Connection ID @id not found.', array(
'@id' => $id,
)));
}