You are here

public function SchemaTest::testUniqueKeyTableDoesNotExistException in Drupal driver for SQL Server and SQL Azure 4.0.x

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

Exception thrown when table does not exist.

Verify that the function parameters after 'name' are correct.

File

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

Class

SchemaTest
Tests table creation and modification via the schema API.

Namespace

Drupal\Tests\sqlsrv\Kernel

Code

public function testUniqueKeyTableDoesNotExistException() {
  $this
    ->expectException(SchemaObjectDoesNotExistException::class);
  $this->schema
    ->addUniqueKey('test_new', 'name', $this->table['fields']);
}