You are here

function NodequeueAdministerTestCase::testNodequeueModifyLabel in Nodequeue 7.2

Same name and namespace in other branches
  1. 6.2 tests/nodequeue.test \NodequeueAdministerTestCase::testNodequeueModifyLabel()

File

tests/nodequeue.test, line 378
Tests for the Nodequeue module.

Class

NodequeueAdministerTestCase

Code

function testNodequeueModifyLabel() {
  $this
    ->drupalLogin($this->user);
  $queue = $this
    ->createNodequeue(array(
    'page',
    'article',
  ), array(
    2,
  ));
  $nodes = $this
    ->populateNodequeue($queue->qid);
  $nids = array_keys($nodes);

  // modify the label of the nodequeue tab...
  $edit = array(
    'nodequeue_use_tab' => TRUE,
    'nodequeue_tab_name' => 'Nodequeue Test Label',
  );
  $this
    ->drupalPost('admin/structure/nodequeue/settings', $edit, 'Save configuration');

  // ...clear the menu cache...
  menu_rebuild();

  // ...and make sure the new label shows up on the node page
  $this
    ->drupalGet('node/' . $nids[0]);
  $this
    ->assertRaw('<a href="' . url('node/' . $nids[0] . '/nodequeue') . '">Nodequeue Test Label', t('Nodequeue tab label has been set.'), t('Nodequeue'));
}