You are here

function DatabaseReservedKeywordTestCase::testTruncateReservedWordTable in Drupal 7

File

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

Class

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

Code

function testTruncateReservedWordTable() {
  db_truncate('virtual')
    ->execute();
  $num_records_after = db_query("SELECT COUNT(*) FROM {virtual}")
    ->fetchField();
  $this
    ->assertEqual(0, $num_records_after, 'Truncated a table with a reserved name.');
}