You are here

function MenuTestCase::testNavigationAsSecondaryMenu in Drupal 7

Tries to use the navigation menu as the source for secondary links.

File

modules/menu/menu.test, line 300
Tests for menu.module.

Class

MenuTestCase
@file Tests for menu.module.

Code

function testNavigationAsSecondaryMenu() {
  $this
    ->drupalLogin($this->big_user);

  // Go to the menu settings page and make the navigation the source for the
  // secondary menu.
  $edit = array(
    'menu_main_links_source' => 'main-menu',
    'menu_secondary_links_source' => 'navigation',
  );
  $this
    ->drupalGet('admin/structure/menu/settings');
  $this
    ->drupalPost(NULL, $edit, t('Save configuration'));

  // Now visit the user page. There should be an 'Add content' link in the
  // navigation block and one in the secondary menu.
  $this
    ->drupalGet('user');
  $this
    ->assertNoUniqueText(t('Add content'));
}