function BasicSyntaxTest::testGetFullQualifiedTableName

Same name in other branches
  1. 8.9.x core/tests/Drupal/KernelTests/Core/Database/BasicSyntaxTest.php \Drupal\KernelTests\Core\Database\BasicSyntaxTest::testGetFullQualifiedTableName()
  2. 10 core/tests/Drupal/KernelTests/Core/Database/BasicSyntaxTest.php \Drupal\KernelTests\Core\Database\BasicSyntaxTest::testGetFullQualifiedTableName()
  3. 11.x core/tests/Drupal/KernelTests/Core/Database/BasicSyntaxTest.php \Drupal\KernelTests\Core\Database\BasicSyntaxTest::testGetFullQualifiedTableName()

Tests \Drupal\Core\Database\Connection::getFullQualifiedTableName().

File

core/tests/Drupal/KernelTests/Core/Database/BasicSyntaxTest.php, line 135

Class

BasicSyntaxTest
Tests SQL syntax interpretation.

Namespace

Drupal\KernelTests\Core\Database

Code

public function testGetFullQualifiedTableName() {
    $database = \Drupal::database();
    $num_matches = $database->select($database->getFullQualifiedTableName('test'), 't')
        ->countQuery()
        ->execute()
        ->fetchField();
    $this->assertSame('4', $num_matches, 'Found 4 records.');
}

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