You are here

public function DatabaseReservedKeywordTestCase::testSelectReservedWordAliasCount in Drupal 7

File

modules/simpletest/tests/database_test.test, line 4326

Class

DatabaseReservedKeywordTestCase
Test reserved keyword handling (introduced for MySQL 8+)

Code

public function testSelectReservedWordAliasCount() {
  $rows = db_select('test', 'character')
    ->countQuery()
    ->execute()
    ->fetchField();
  $this
    ->assertEqual($rows, 4, 'Successful count query using an alias which is a reserved word.');
}