function DriverSpecificConnectionUnitTestBase::assertConnection

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

Asserts that a connection ID exists.

@internal

Parameters

int $id: The connection ID to verify.

1 call to DriverSpecificConnectionUnitTestBase::assertConnection()
DriverSpecificConnectionUnitTestBase::setUp in core/tests/Drupal/KernelTests/Core/Database/DriverSpecificConnectionUnitTestBase.php

File

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

Class

DriverSpecificConnectionUnitTestBase
Tests management of database connections.

Namespace

Drupal\KernelTests\Core\Database

Code

protected function assertConnection(int $id) : void {
    $this->assertArrayHasKey($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.