You are here

public function FeedsXPathParserWebTestCase::setUp in Feeds XPath Parser 6

Same name and namespace in other branches
  1. 7 tests/feeds_xpathparser.test \FeedsXPathParserWebTestCase::setUp()

Set up test.

Overrides FeedsWebTestCase::setUp

File

tests/feeds_xpathparser.test, line 16
Tests for FeedsXPathParserXML.inc.

Class

FeedsXPathParserWebTestCase
Test single feeds.

Code

public function setUp() {
  parent::setUp('feeds_xpathparser');
  $this
    ->drupalLogin($this
    ->drupalCreateUser(array(
    'administer feeds',
    'administer nodes',
    'administer content types',
  )));

  // Set the front page to show 30 nodes so we can easily see what is aggregated.
  $edit = array(
    'default_nodes_main' => 30,
  );
  $this
    ->drupalPost('admin/content/node-settings', $edit, 'Save configuration');

  // Set the teaser length display to unlimited otherwise tests looking for
  // text on nodes will fail.

  //$edit = array('fields[body][type]' => 'text_default');

  //$this->drupalPost('admin/structure/types/manage/article/display/teaser', $edit, 'Save');

  // Generalize across my version of feeds and the standard one.
  $items = feeds_ui_menu();
  if (isset($items['admin/build/feeds/%feeds_importer/edit'])) {
    $this->feeds_base = 'admin/structure/feeds';
  }
  else {
    $this->feeds_base = 'admin/build/feeds/edit';
  }
}