You are here

public function SchemaTest::testDropTableComment in Drupal driver for SQL Server and SQL Azure 3.1.x

Same name and namespace in other branches
  1. 8.2 tests/src/Kernel/SchemaTest.php \Drupal\Tests\sqlsrv\Kernel\SchemaTest::testDropTableComment()
  2. 4.2.x tests/src/Kernel/SchemaTest.php \Drupal\Tests\sqlsrv\Kernel\SchemaTest::testDropTableComment()
  3. 3.0.x tests/src/Kernel/SchemaTest.php \Drupal\Tests\sqlsrv\Kernel\SchemaTest::testDropTableComment()
  4. 4.0.x tests/src/Kernel/SchemaTest.php \Drupal\Tests\sqlsrv\Kernel\SchemaTest::testDropTableComment()
  5. 4.1.x tests/src/Kernel/SchemaTest.php \Drupal\Tests\sqlsrv\Kernel\SchemaTest::testDropTableComment()

Verify that comments are dropped when the table is dropped.

File

tests/src/Kernel/SchemaTest.php, line 82

Class

SchemaTest
Tests table creation and modification via the schema API.

Namespace

Drupal\Tests\sqlsrv\Kernel

Code

public function testDropTableComment() {

  // Drop table and ensure comment does not exist.
  $this->schema
    ->dropTable('test');
  $this
    ->assertFalse($this->schema
    ->getComment('test'));
  $this->schema
    ->createTable('test', $this->table);

  // Verify comment is correct.
  $comment = $this->schema
    ->getComment('test');
  $this
    ->assertEquals('New Comment', $comment);
}