function DriverSpecificConnectionUnitTestBase::assertNoConnection

Same name in other branches
  1. 9 core/tests/Drupal/KernelTests/Core/Database/DriverSpecificConnectionUnitTestBase.php \Drupal\KernelTests\Core\Database\DriverSpecificConnectionUnitTestBase::assertNoConnection()
  2. 10 core/tests/Drupal/KernelTests/Core/Database/DriverSpecificConnectionUnitTestBase.php \Drupal\KernelTests\Core\Database\DriverSpecificConnectionUnitTestBase::assertNoConnection()

Asserts that a connection ID does not exist.

@internal

Parameters

int $id: The connection ID to verify.

4 calls to DriverSpecificConnectionUnitTestBase::assertNoConnection()
DriverSpecificConnectionUnitTestBase::testOpenClose in core/tests/Drupal/KernelTests/Core/Database/DriverSpecificConnectionUnitTestBase.php
Tests Database::closeConnection() without query.
DriverSpecificConnectionUnitTestBase::testOpenQueryClose in core/tests/Drupal/KernelTests/Core/Database/DriverSpecificConnectionUnitTestBase.php
Tests Database::closeConnection() with a query.
DriverSpecificConnectionUnitTestBase::testOpenQueryPrefetchClose in core/tests/Drupal/KernelTests/Core/Database/DriverSpecificConnectionUnitTestBase.php
Tests Database::closeConnection() with a query and custom prefetch method.
DriverSpecificConnectionUnitTestBase::testOpenSelectQueryClose in core/tests/Drupal/KernelTests/Core/Database/DriverSpecificConnectionUnitTestBase.php
Tests Database::closeConnection() with a select query.

File

core/tests/Drupal/KernelTests/Core/Database/DriverSpecificConnectionUnitTestBase.php, line 96

Class

DriverSpecificConnectionUnitTestBase
Tests management of database connections.

Namespace

Drupal\KernelTests\Core\Database

Code

protected function assertNoConnection(int $id) : void {
    $this->assertArrayNotHasKey($id, $this->monitor
        ->query($this->getQuery()['processlist'])
        ->fetchAllKeyed(0, 0));
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.