protected function ConnectionUnitTest::assertNoConnection in Drupal 10
Same name and namespace in other branches
- 8 core/tests/Drupal/KernelTests/Core/Database/ConnectionUnitTest.php \Drupal\KernelTests\Core\Database\ConnectionUnitTest::assertNoConnection()
- 9 core/tests/Drupal/KernelTests/Core/Database/ConnectionUnitTest.php \Drupal\KernelTests\Core\Database\ConnectionUnitTest::assertNoConnection()
Asserts that a connection ID does not exist.
@internal
Parameters
int $id: The connection ID to verify.
File
- core/
tests/ Drupal/ KernelTests/ Core/ Database/ ConnectionUnitTest.php, line 114
Class
- ConnectionUnitTest
- Tests management of database connections.
Namespace
Drupal\KernelTests\Core\DatabaseCode
protected function assertNoConnection(int $id) : void {
$list = $this->monitor
->query($this
->getQuery()['processlist'])
->fetchAllKeyed(0, 0);
$this
->assertFalse(isset($list[$id]), new FormattableMarkup('Connection ID @id not found.', [
'@id' => $id,
]));
}