You are here

function FeedsRSStoNodesTest::testNonFeedNodeUI in Feeds 6

Same name and namespace in other branches
  1. 7.2 tests/feeds_processor_node.test \FeedsRSStoNodesTest::testNonFeedNodeUI()

Test that feed elements and links are not found on non-feed nodes.

File

tests/feeds_processor_node.test, line 435
Tests for plugins/FeedsNodeProcessor.inc.

Class

FeedsRSStoNodesTest
Test aggregating a feed as node items.

Code

function testNonFeedNodeUI() {

  // There should not be feed links on an article node.
  $non_feed_node = $this
    ->drupalCreateNode(array(
    'type' => 'story',
  ));
  $this
    ->drupalGet('node/' . $non_feed_node->nid);
  $this
    ->assertNoLinkByHref('node/' . $non_feed_node->nid . '/import');
  $this
    ->assertNoLink('Delete items');

  // Navigate to a non-feed node form, there should be no Feed field visible.
  $this
    ->drupalGet('node/add/article');
  $this
    ->assertNoFieldByName('feeds[FeedsHTTPFetcher][source]');
}