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
8c58a319
Commit
8c58a319
authored
13 years ago
by
Dave Reid
Browse files
Options
Downloads
Patches
Plain Diff
Issue #1066286: Added test to ensure 'Feed items' doesn't display on non-feed nodes.
parent
9232a314
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
feeds_news/feeds_news.test
+9
-2
9 additions, 2 deletions
feeds_news/feeds_news.test
with
9 additions
and
2 deletions
feeds_news/feeds_news.test
+
9
−
2
View file @
8c58a319
...
...
@@ -9,12 +9,12 @@
* Test Feed configuration.
*/
class
FeedsExamplesFeedTestCase
extends
FeedsWebTestCase
{
public
static
function
getInfo
()
{
return
array
(
'name'
=>
'Feature: Feed'
,
'description'
=>
'Test "Feed" default configuration.'
,
'group'
=>
'Feeds'
,
'dependencies'
=>
array
(
'features'
,
'views'
),
);
}
...
...
@@ -22,7 +22,7 @@ class FeedsExamplesFeedTestCase extends FeedsWebTestCase {
* Enable feeds_news feature.
*/
public
function
setUp
()
{
parent
::
setUp
(
array
(
'feeds_news'
));
parent
::
setUp
(
array
(
'features'
,
'views'
,
'feeds_news'
));
}
/**
...
...
@@ -31,6 +31,13 @@ class FeedsExamplesFeedTestCase extends FeedsWebTestCase {
public
function
test
()
{
$nid
=
$this
->
createFeedNode
(
'feed'
,
NULL
,
''
,
'feed'
);
// Assert menu tabs for feed nodes does not show up on non-feed nodes.
$this
->
drupalGet
(
"node/
{
$nid
}
/feed-items"
);
$this
->
assertResponse
(
200
);
$not_feed_node
=
$this
->
drupalCreateNode
();
$this
->
drupalGet
(
"node/
{
$not_feed_node
->
nid
}
/feed-items"
);
$this
->
assertResponse
(
404
);
// Assert results.
$count
=
db_query
(
"SELECT COUNT(*) FROM
{
node
}
WHERE type = 'feed_item'"
)
->
fetchField
();
$this
->
assertEqual
(
$count
,
10
,
'Found the correct number of feed item nodes in database.'
);
...
...
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