protected function DataTestCaseUI::dropTable in Data 7
Same name and namespace in other branches
- 6 data_ui/tests/data_ui.test \DataTestCaseUI::dropTable()
Drop a table.
1 call to DataTestCaseUI::dropTable()
- DataTestCaseUI::testCRUDTable in data_ui/
tests/ data_ui.test - CRUD table tests on UI.
File
- data_ui/
tests/ data_ui.test, line 214
Class
- DataTestCaseUI
- Test basic Data API functionality.
Code
protected function dropTable($table_name) {
$this
->drupalPost('admin/build/data/drop/' . $table_name, array(), 'Drop');
$exists = db_result(db_query('SELECT name FROM {data_tables} WHERE name = "%s"', $table_name));
$this
->assertFalse($exists, 'Table removed from data_tables table.');
$this
->assertFalse(drupal_get_schema($table_name, TRUE), 'Table ' . $table_name . ' removed from schema API.');
$this
->assertFalse(db_table_exists($table_name), 'Table ' . $table_name . ' removed from DB.');
}