function ConnectionTest::testEscapeTable

Same name and namespace in other branches
  1. 11.x core/tests/Drupal/Tests/Core/Database/ConnectionTest.php \Drupal\Tests\Core\Database\ConnectionTest::testEscapeTable()
  2. 10 core/tests/Drupal/Tests/Core/Database/ConnectionTest.php \Drupal\Tests\Core\Database\ConnectionTest::testEscapeTable()
  3. 9 core/tests/Drupal/Tests/Core/Database/ConnectionTest.php \Drupal\Tests\Core\Database\ConnectionTest::testEscapeTable()

Tests escape table.

Attributes

#[DataProvider('providerEscapeTables')]

File

core/tests/Drupal/Tests/Core/Database/ConnectionTest.php, line 473

Class

ConnectionTest
Tests the Connection class.

Namespace

Drupal\Tests\Core\Database

Code

public function testEscapeTable(string $expected, string $name, array $identifier_quote = [
  '"',
  '"',
]) : void {
  $connection = new StubConnection($this->createStub(\PDO::class), [], $identifier_quote);
  $this->assertEquals($expected, $connection->escapeTable($name));
}

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