SchemaTest.php

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

Namespace

Drupal\Tests\pgsql\Kernel\pgsql

File

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

View source
<?php

namespace Drupal\Tests\pgsql\Kernel\pgsql;

use Drupal\KernelTests\Core\Database\DriverSpecificSchemaTestBase;

/**
 * Tests schema API for the PostgreSQL driver.
 *
 * @group Database
 */
class SchemaTest extends DriverSpecificSchemaTestBase {
    
    /**
     * @covers \Drupal\Core\Database\Driver\pgsql\Schema::extensionExists
     */
    public function testPgsqlExtensionExists() : void {
        // Test the method for a non existing extension.
        $this->assertFalse($this->schema
            ->extensionExists('non_existing_extension'));
        // Test the method for an existing extension.
        $this->assertTrue($this->schema
            ->extensionExists('pg_trgm'));
    }

}

Classes

Title Deprecated Summary
SchemaTest Tests schema API for the PostgreSQL driver.

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