protected function DatabaseTransactionTestCase::executeDDLStatement

Execute a DDL statement.

1 call to DatabaseTransactionTestCase::executeDDLStatement()
DatabaseTransactionTestCase::testTransactionWithDdlStatement in drupal/modules/simpletest/tests/database_test.test
Test the compatibility of transactions with DDL statements.

File

drupal/modules/simpletest/tests/database_test.test, line 3782

Class

DatabaseTransactionTestCase
Test transaction support, particularly nesting.

Code

protected function executeDDLStatement() {
  static $count = 0;
  $table = array(
    'fields' => array(
      'id' => array(
        'type' => 'serial',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
    ),
    'primary key' => array(
      'id',
    ),
  );
  db_create_table('database_test_' . ++$count, $table);
}