Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
feeds
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
drupal.org
feeds
Commits
ef104d07
Commit
ef104d07
authored
9 years ago
by
Chris Leppanen
Browse files
Options
Downloads
Patches
Plain Diff
Add test for #2489006.
parent
f363e0ac
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/feeds_mapper_taxonomy.test
+23
-2
23 additions, 2 deletions
tests/feeds_mapper_taxonomy.test
with
23 additions
and
2 deletions
tests/feeds_mapper_taxonomy.test
+
23
−
2
View file @
ef104d07
...
...
@@ -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
);
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment