You are here

public function FeedsWebTestCase::createImporterConfiguration in Feeds 7

Same name and namespace in other branches
  1. 6 tests/feeds.test \FeedsWebTestCase::createImporterConfiguration()
  2. 7.2 tests/feeds.test \FeedsWebTestCase::createImporterConfiguration()

Create an importer configuration.

Parameters

$name: The natural name of the feed.

$id: The persistent id of the feed.

$edit: Optional array that defines the basic settings for the feed in a format that can be posted to the feed's basic settings form.

16 calls to FeedsWebTestCase::createImporterConfiguration()
FeedsCSVtoTermsTest::test in tests/feeds_processor_term.test
Test node creation, refreshing/deleting feeds and feed items.
FeedsCSVtoUsersTest::test in tests/feeds_processor_user.test
Test node creation, refreshing/deleting feeds and feed items.
FeedsMapperContentTestCase::test in tests/feeds_mapper_content.test
Basic test loading a doulbe entry CSV file.
FeedsMapperDateTestCase::test in tests/feeds_mapper_date.test
Basic test loading a single entry CSV file.
FeedsMapperEmfieldTestCase::test in tests/feeds_mapper_emfield.test
Basic test loading a doulbe entry CSV file.

... See full list

File

tests/feeds.test.inc, line 89
Common functionality for all Feeds tests.

Class

FeedsWebTestCase
Test basic Data API functionality.

Code

public function createImporterConfiguration($name = 'Syndication', $id = 'syndication') {

  // Create new feed configuration.
  $this
    ->drupalGet('admin/structure/feeds');
  $this
    ->clickLink('New importer');
  $edit = array(
    'name' => $name,
    'id' => $id,
  );
  $this
    ->drupalPost('admin/structure/feeds/create', $edit, 'Create');

  // Assert message and presence of default plugins.
  $this
    ->assertText('Your configuration has been created with default settings.');
  $this
    ->assertPlugins($id, 'FeedsHTTPFetcher', 'FeedsSyndicationParser', 'FeedsNodeProcessor');

  // Per default attach to page content type.
  $this
    ->setSettings($id, NULL, array(
    'content_type' => 'page',
  ));
}