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

Add test for #2489006.

parent f363e0ac
No related branches found
No related tags found
No related merge requests found
......@@ -17,7 +17,7 @@ class FeedsMapperTaxonomyTestCase extends FeedsMapperTestCase {
);
}
function setUp() {
public function setUp() {
parent::setUp();
// Add Tags vocabulary
......@@ -114,7 +114,7 @@ class FeedsMapperTaxonomyTestCase extends FeedsMapperTestCase {
/**
* Tests inheriting taxonomy from the feed node.
*/
function testInheritTaxonomy() {
public function testInheritTaxonomy() {
// Adjust importer settings
$this->setSettings('syndication', NULL, array('import_period' => FEEDS_SCHEDULE_NEVER));
......@@ -344,6 +344,26 @@ class FeedsMapperTaxonomyTestCase extends FeedsMapperTestCase {
}
}
/**
* Tests that there are no errors when trying to map to an invalid vocabulary.
*/
public function testMissingVocabulary() {
$this->addMappings('syndication', array(
5 => array(
'source' => 'tags',
'target' => 'field_tags',
'term_search' => 0,
'autocreate' => TRUE,
),
));
// Create an invalid configuration.
db_delete('taxonomy_vocabulary')->execute();
$this->createFeedNode('syndication', NULL, 'Syndication');
$this->assertText('Created 10 nodes.');
}
/**
* Finds node style taxonomy term markup in DOM.
*/
......@@ -359,4 +379,5 @@ class FeedsMapperTaxonomyTestCase extends FeedsMapperTestCase {
$term = check_plain($term);
$this->assertNoPattern('/<a href="\/.*taxonomy\/term\/[0-9]+">' . $term . '<\/a>/', 'Did not find ' . $term);
}
}
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