function ReservedWordTest::testSelectReservedWordTableCount
Tests SELECT count query from a table with a reserved name.
File
- 
              core/
tests/ Drupal/ KernelTests/ Core/ Database/ ReservedWordTest.php, line 17  
Class
- ReservedWordTest
 - Tests queries that include reserved words.
 
Namespace
Drupal\KernelTests\Core\DatabaseCode
public function testSelectReservedWordTableCount() : void {
  $query = $this->connection
    ->select('virtual');
  $num_records = $query->countQuery()
    ->execute()
    ->fetchField();
  $this->assertSame('1', $num_records);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.