t('Table Wizard Import Delimited'), 'description' => t('Test Table Wizard delimited import'), 'group' => t('Table Wizard'), ); } function setUp() { parent::setUp('views', 'schema', 'tw', 'tw_import_delimited'); // Create and login user $tw_user = $this->drupalCreateUser(array('table wizard administration')); $this->drupalLogin($tw_user); } function tearDown() { parent::tearDown(); } /** * Test UI for importing delimited tables */ function testTwAddTables() { $rpath = realpath(drupal_get_path('module', 'tw_import_delimited') . '/tests/simpletable.csv'); $this->drupalPost('admin/content/tw', array('files[delimited]' => $rpath), t('Import new file')); $count = db_result(db_query("SELECT COUNT(*) FROM {tw_tables} WHERE tablename='simpletable' AND dbconnection='default'")); $this->assertTrue($count == 1, t('Table added to tw_tables')); } }