public function FeedsRSStoNodesTest::testPushImport in Feeds 7.2
Tests the FeedsSource::pushImport() method.
File
- tests/
feeds_processor_node.test, line 909 - Tests for plugins/FeedsNodeProcessor.inc.
Class
- FeedsRSStoNodesTest
- Test aggregating a feed as node items.
Code
public function testPushImport() {
// Attach to standalone importer.
$this
->setSettings('syndication', NULL, array(
'content_type' => '',
));
$raw = file_get_contents(dirname(__FILE__) . '/feeds/developmentseed.rss2');
feeds_source('syndication', 0)
->pushImport(new FeedsFetcherResult($raw));
$this
->assertEqual(10, db_query("SELECT COUNT(*) FROM {node}")
->fetchField());
}