You are here

public function FeedsContentTypeTest::testRetrieveTitleFromFeed in Feeds 7.2

Tests if titles can be retrieved from a feed.

File

tests/feeds_content_type.test, line 64
Contains FeedsContentTypeTest.

Class

FeedsContentTypeTest
Tests for when an importer is attached to a content type.

Code

public function testRetrieveTitleFromFeed() {

  // The Common syndication parser supports retrieving title from feed.
  $edit = array(
    'feeds[FeedsHTTPFetcher][source]' => $GLOBALS['base_url'] . '/' . drupal_get_path('module', 'feeds') . '/tests/feeds/developmentseed.rss2',
  );
  $this
    ->drupalPost('node/add/page', $edit, 'Save');
  $node = node_load(1);
  $this
    ->assertEqual('Development Seed - Technological Solutions for Progressive Organizations', $node->title, 'The title was retrieved from the feed.');
}