public function FeedsCSVtoRelationsTest::setUp in Relation 7
File
- relation_feeds/
tests/ relation.feeds_processor.test, line 25
Class
- FeedsCSVtoRelationsTest
- Test aggregating a feed as data records.
Code
public function setUp() {
// relation_ctools_test module provides relation type that we can use to
// test feeds imports
parent::setUp(array(
'relation_feeds',
'relation',
'relation_ctools_test',
));
$this
->importUsers();
// Create an importer.
$this
->createImporterConfiguration('Relation import', 'relation_import');
// Set and configure plugins.
$this
->setPlugin('relation_import', 'FeedsFileFetcher');
$this
->setPlugin('relation_import', 'FeedsCSVParser');
$this
->setPlugin('relation_import', 'RelationFeedsProcessor');
// 'no_headers' setting would suit well for relation endpoint testing but,
// thats not working atm because of https://drupal.org/node/1984962.
// As a workaround columns are now named user1,user2...
$this
->setSettings('relation_import', 'FeedsCSVParser', array(
'no_headers' => FALSE,
));
}