You are here

protected function DatabaseTransactionTestCase::executeDDLStatement in Drupal 7

Execute a DDL statement.

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

File

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

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