class SchemaTest

Same name in this branch
  1. 9 core/modules/mysql/tests/src/Kernel/mysql/SchemaTest.php \Drupal\Tests\mysql\Kernel\mysql\SchemaTest
  2. 9 core/modules/pgsql/tests/src/Unit/SchemaTest.php \Drupal\Tests\pgsql\Unit\SchemaTest
  3. 9 core/tests/Drupal/KernelTests/Core/Database/SchemaTest.php \Drupal\KernelTests\Core\Database\SchemaTest
Same name and namespace in other branches
  1. 11.x core/modules/sqlite/tests/src/Kernel/sqlite/SchemaTest.php \Drupal\Tests\sqlite\Kernel\sqlite\SchemaTest
  2. 11.x core/modules/mysql/tests/src/Kernel/mysql/SchemaTest.php \Drupal\Tests\mysql\Kernel\mysql\SchemaTest
  3. 11.x core/modules/pgsql/tests/src/Unit/SchemaTest.php \Drupal\Tests\pgsql\Unit\SchemaTest
  4. 11.x core/modules/pgsql/tests/src/Kernel/pgsql/SchemaTest.php \Drupal\Tests\pgsql\Kernel\pgsql\SchemaTest
  5. 11.x core/modules/mysqli/tests/src/Kernel/mysqli/SchemaTest.php \Drupal\Tests\mysqli\Kernel\mysqli\SchemaTest

Tests schema API for the PostgreSQL driver.

@group Database

Hierarchy

Expanded class hierarchy of SchemaTest

File

core/modules/pgsql/tests/src/Kernel/pgsql/SchemaTest.php, line 12

Namespace

Drupal\Tests\pgsql\Kernel\pgsql
View source
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'));
  }

}

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