public function FeedsRSStoNodesTest::setUp in Feeds 6
Same name and namespace in other branches
- 7.2 tests/feeds_processor_node.test \FeedsRSStoNodesTest::setUp()
- 7 tests/feeds_processor_node.test \FeedsRSStoNodesTest::setUp()
Set up test.
Overrides FeedsWebTestCase::setUp
File
- tests/
feeds_processor_node.test, line 25 - Tests for plugins/FeedsNodeProcessor.inc.
Class
- FeedsRSStoNodesTest
- Test aggregating a feed as node items.
Code
public function setUp() {
parent::setUp();
// Set the front page to show 20 nodes so we can easily see what is aggregated.
variable_set('default_nodes_main', 20);
// Set the teaser length display to unlimited otherwise tests looking for
// text on nodes will fail.
variable_set('teaser_length', 0);
// Create an importer configuration.
$this
->createImporterConfiguration('Syndication', 'syndication');
$this
->addMappings('syndication', array(
array(
'source' => 'title',
'target' => 'title',
'unique' => FALSE,
),
array(
'source' => 'description',
'target' => 'body',
'unique' => FALSE,
),
array(
'source' => 'timestamp',
'target' => 'created',
'unique' => FALSE,
),
array(
'source' => 'url',
'target' => 'url',
'unique' => TRUE,
),
array(
'source' => 'guid',
'target' => 'guid',
'unique' => TRUE,
),
));
}