You are here

public function BasicSyntaxTest::testGetFullQualifiedTableName in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/system/src/Tests/Database/BasicSyntaxTest.php \Drupal\system\Tests\Database\BasicSyntaxTest::testGetFullQualifiedTableName()

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

File

core/modules/system/src/Tests/Database/BasicSyntaxTest.php, line 132
Contains \Drupal\system\Tests\Database\BasicSyntaxTest.

Class

BasicSyntaxTest
Tests SQL syntax interpretation.

Namespace

Drupal\system\Tests\Database

Code

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