function FeedsRSStoNodesTest::testOddFeedSchemes in Feeds 8.2
Test using non-normal URLs like feed:// and webcal://.
File
- lib/
Drupal/ feeds/ Tests/ FeedsRSStoNodesTest.php, line 374 - Tests for plugins/FeedsNodeProcessor.inc.
Class
- FeedsRSStoNodesTest
- Test aggregating a feed as node items.
Namespace
Drupal\feeds\TestsCode
function testOddFeedSchemes() {
$url = $GLOBALS['base_url'] . '/' . drupal_get_path('module', 'feeds') . '/tests/feeds/developmentseed.rss2';
$schemes = array(
'feed',
'webcal',
);
$item_count = 0;
foreach ($schemes as $scheme) {
$feed_url = strtr($url, array(
'http://' => $scheme . '://',
'https://' => $scheme . '://',
));
$edit['feeds[Drupal\\feeds\\Plugin\\feeds\\fetcher\\FeedsHTTPFetcher][source]'] = $feed_url;
$this
->drupalPost('node/add/page', $edit, 'Save and publish');
$this
->assertText('Basic page Development Seed - Technological Solutions for Progressive Organizations has been created.');
$this
->assertText('Created 10 nodes.');
$this
->assertFeedItemCount($item_count + 10);
$item_count += 10;
}
}