function DatabaseReservedKeywordTestCase::testTruncateReservedWordTable

File

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

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.');
}

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