public function FeedsTamperUIWebTestCase::deleteTamperPlugin in Feeds Tamper 6
Same name and namespace in other branches
- 8.2 legacy/feeds_tamper_ui/tests/feeds_tamper_ui.test \FeedsTamperUIWebTestCase::deleteTamperPlugin()
- 7 feeds_tamper_ui/tests/feeds_tamper_ui.test \FeedsTamperUIWebTestCase::deleteTamperPlugin()
Overrides FeedsTamperWebTestHelper::deleteTamperPlugin
1 call to FeedsTamperUIWebTestCase::deleteTamperPlugin()
- FeedsTamperUIWebTestCase::testBasic in feeds_tamper_ui/
tests/ feeds_tamper_ui.test
File
- feeds_tamper_ui/
tests/ feeds_tamper_ui.test, line 243 - Tests for feeds_tamper_ui.module.
Class
- FeedsTamperUIWebTestCase
- Test Feeds Tamper UI.
Code
public function deleteTamperPlugin($id) {
$url = FEEDS_TAMPER_UI_BASE . '/delete/' . $id;
$this
->drupalGet($url);
$instance = feeds_tamper_load_instance($id);
$this
->assertText('Would you really like to delete the plugin ' . $instance->description . '?');
$this
->assertText('This action cannot be undone.');
$this
->drupalPost(NULL, array(), 'Delete');
$source_name = feeds_tamper_ui_source_name($instance);
$this
->assertText('The plugin ' . $instance->description . ' has been deleted from ' . $source_name . '.');
$result = db_fetch_object(db_query("SELECT * FROM {feeds_tamper} WHERE id = '%s'", $id));
$this
->assertFalse($result);
}