function SchemaTest::checkSchemaComment

Checks that a table or column comment matches a given description.

Parameters

string $description: The asserted description.

string $table: The table to test.

string|null $column: Optional column to test.

Overrides DriverSpecificSchemaTestBase::checkSchemaComment

File

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

Class

SchemaTest
Tests schema API for the PostgreSQL driver.

Namespace

Drupal\Tests\pgsql\Kernel\pgsql

Code

public function checkSchemaComment(string $description, string $table, ?string $column = NULL) : void {
  $this->assertSame($description, $this->schema
    ->getComment($table, $column), 'The comment matches the schema description.');
}

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