You are here

function FeedsRSStoNodesTest::testOddFeedSchemes in Feeds 6

Same name and namespace in other branches
  1. 7.2 tests/feeds_processor_node.test \FeedsRSStoNodesTest::testOddFeedSchemes()

Test using non-normal URLs like feed:// and webcal://.

File

tests/feeds_processor_node.test, line 415
Tests for plugins/FeedsNodeProcessor.inc.

Class

FeedsRSStoNodesTest
Test aggregating a feed as node items.

Code

function testOddFeedSchemes() {
  $url = $GLOBALS['base_url'] . '/' . drupal_get_path('module', 'feeds') . '/tests/feeds/developmentseed.rss2';
  $schemes = array(
    'feed',
  );
  $item_count = 0;
  foreach ($schemes as $scheme) {
    $feed_url = strtr($url, array(
      'http://' => $scheme . '://',
      'https://' => $scheme . '://',
    ));
    $edit['feeds[FeedsHTTPFetcher][source]'] = $feed_url;
    $this
      ->drupalPost('node/add/page', $edit, 'Save');
    $this
      ->assertText('Page Development Seed - Technological Solutions for Progressive Organizations has been created.');
    $this
      ->assertText('Created 10 Story nodes.');
    $this
      ->assertFeedItemCount($item_count + 10);
    $item_count += 10;
  }
}