You are here

protected function FeedsTamperUIWebTestCase::deleteTamperPlugin in Feeds Tamper 7

Same name and namespace in other branches
  1. 8.2 legacy/feeds_tamper_ui/tests/feeds_tamper_ui.test \FeedsTamperUIWebTestCase::deleteTamperPlugin()
  2. 6 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 258
Tests for feeds_tamper_ui.module.

Class

FeedsTamperUIWebTestCase
Test Feeds Tamper UI.

Code

protected function deleteTamperPlugin($id) {
  $instance = feeds_tamper_load_instance($id);
  $url = 'admin/structure/feeds/' . $instance->importer . '/tamper/' . $id . '/delete';
  $this
    ->drupalGet($url);
  $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_query("SELECT * FROM {feeds_tamper} WHERE id = :id", array(
    ':id' => $instance->id,
  ))
    ->fetchObject();
  $this
    ->assertFalse($result);
}