Skip to content
Snippets Groups Projects
Commit 39794f6b authored by Chris Leppanen's avatar Chris Leppanen
Browse files

Fix path alias test for taxonomy terms.

parent d5f37a7f
No related branches found
No related tags found
No related merge requests found
...@@ -97,7 +97,7 @@ abstract class FeedsPlugin extends FeedsConfigurable implements FeedsSourceInter ...@@ -97,7 +97,7 @@ abstract class FeedsPlugin extends FeedsConfigurable implements FeedsSourceInter
$files = drupal_system_listing('/.*\.inc$/', $path, 'name', 0); $files = drupal_system_listing('/.*\.inc$/', $path, 'name', 0);
foreach ($files as $file) { foreach ($files as $file) {
if (strstr($file->uri, '/mappers/')) { if (strstr($file->uri, '/mappers/')) {
require_once("./$file->uri"); require_once(DRUPAL_ROOT . '/' . $file->uri);
} }
} }
} }
......
...@@ -86,6 +86,20 @@ class FeedsMapperPathTestCase extends FeedsMapperTestCase { ...@@ -86,6 +86,20 @@ class FeedsMapperPathTestCase extends FeedsMapperTestCase {
$this->setPlugin('path_test', 'FeedsFileFetcher'); $this->setPlugin('path_test', 'FeedsFileFetcher');
$this->setPlugin('path_test', 'FeedsCSVParser'); $this->setPlugin('path_test', 'FeedsCSVParser');
$this->setPlugin('path_test', 'FeedsTermProcessor'); $this->setPlugin('path_test', 'FeedsTermProcessor');
// Turn on update existing.
$this->setSettings('path_test', 'FeedsTermProcessor', array('update_existing' => 2));
// Create vocabulary.
$edit = array(
'name' => 'Addams vocabulary',
'machine_name' => 'addams',
);
$this->drupalPost('admin/structure/taxonomy/add', $edit, t('Save'));
$this->setSettings('path_test', 'FeedsTermProcessor', array('vocabulary' => 'addams'));
// Add mappings.
$this->addMappings('path_test', array( $this->addMappings('path_test', array(
array( array(
'source' => 'Title', 'source' => 'Title',
...@@ -102,18 +116,6 @@ class FeedsMapperPathTestCase extends FeedsMapperTestCase { ...@@ -102,18 +116,6 @@ class FeedsMapperPathTestCase extends FeedsMapperTestCase {
), ),
)); ));
// Turn on update existing.
$this->setSettings('path_test', 'FeedsTermProcessor', array('update_existing' => 2));
// Create vocabulary.
$edit = array(
'name' => 'Addams vocabulary',
'machine_name' => 'addams',
);
$this->drupalPost('admin/structure/taxonomy/add', $edit, t('Save'));
$this->setSettings('path_test', 'FeedsTermProcessor', array('vocabulary' => 'addams'));
// Import RSS file. // Import RSS file.
$this->importFile('path_test', $this->absolutePath() . '/tests/feeds/path_alias.csv'); $this->importFile('path_test', $this->absolutePath() . '/tests/feeds/path_alias.csv');
$this->assertText('Created 9 terms'); $this->assertText('Created 9 terms');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment