ConnectionUnitTest.php

Same filename in this branch
  1. 9 core/modules/mysql/tests/src/Kernel/mysql/ConnectionUnitTest.php
Same filename in other branches
  1. 8.9.x core/tests/Drupal/KernelTests/Core/Database/ConnectionUnitTest.php
  2. 10 core/modules/mysql/tests/src/Kernel/mysql/ConnectionUnitTest.php
  3. 10 core/modules/pgsql/tests/src/Kernel/pgsql/ConnectionUnitTest.php
  4. 11.x core/modules/mysql/tests/src/Kernel/mysql/ConnectionUnitTest.php
  5. 11.x core/modules/pgsql/tests/src/Kernel/pgsql/ConnectionUnitTest.php

Namespace

Drupal\Tests\pgsql\Kernel\pgsql

File

core/modules/pgsql/tests/src/Kernel/pgsql/ConnectionUnitTest.php

View source
<?php

namespace Drupal\Tests\pgsql\Kernel\pgsql;

use Drupal\KernelTests\Core\Database\DriverSpecificConnectionUnitTestBase;

/**
 * PostgreSQL-specific connection unit tests.
 *
 * @group Database
 */
class ConnectionUnitTest extends DriverSpecificConnectionUnitTestBase {
    
    /**
     * Returns a set of queries specific for PostgreSQL.
     */
    protected function getQuery() : array {
        return [
            'connection_id' => 'SELECT pg_backend_pid()',
            'processlist' => 'SELECT pid FROM pg_stat_activity',
            'show_tables' => 'SELECT * FROM pg_catalog.pg_tables',
        ];
    }

}

Classes

Title Deprecated Summary
ConnectionUnitTest PostgreSQL-specific connection unit tests.

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