public function FeedsCSVtoTermsTest::setUp in Feeds 7.2
Same name and namespace in other branches
- 7 tests/feeds_processor_term.test \FeedsCSVtoTermsTest::setUp()
Set up test.
Overrides FeedsWebTestCase::setUp
File
- tests/
feeds_processor_term.test, line 27 - Tests for plugins/FeedsTermProcessor.inc.
Class
- FeedsCSVtoTermsTest
- Test aggregating a feed as data records.
Code
public function setUp() {
parent::setUp();
// Create an importer.
$this
->createImporterConfiguration('Term import', 'term_import');
// Set and configure plugins and mappings.
$this
->setPlugin('term_import', 'FeedsFileFetcher');
$this
->setPlugin('term_import', 'FeedsCSVParser');
$this
->setPlugin('term_import', 'FeedsTermProcessor');
// Create vocabulary.
$edit = array(
'name' => 'Addams vocabulary',
'machine_name' => 'addams',
);
$this
->drupalPost('admin/structure/taxonomy/add', $edit, t('Save'));
$this
->setSettings('term_import', 'FeedsTermProcessor', array(
'bundle' => 'addams',
));
// Use standalone form.
$this
->setSettings('term_import', NULL, array(
'content_type' => '',
));
}