1 admin_bar.test AdminBarLinkTypesTestCase::testLinkTypes()

Tests appearance of different router item link types.

File

core/modules/admin_bar/tests/admin_bar.test, line 378
Tests for the Administration bar module.

Class

AdminBarLinkTypesTestCase
Tests appearance of different types of links.

Code

function testLinkTypes() {
  // Verify that MENU_NORMAL_ITEMs appear.
  $this->assertLinkTrailByTitle(array(
    t('Configuration'),
    t('System'),
    t('Site information'),
  ));

  // Verify that MENU_LOCAL_TASKs appear.
  $this->assertLinkTrailByTitle(array(t('Functionality'), t('Uninstall modules')));

  // Verify that MENU_LOCAL_ACTIONs appear.
  $this->assertLinkTrailByTitle(array(
    t('User accounts'),
    t('Add user account'),
  ));

  // Verify that MENU_DEFAULT_LOCAL_TASKs do NOT appear.
  $this->assertNoLinkTrailByTitle(array(t('Appearance'), t('List')));
  $this->assertNoLinkTrailByTitle(array(t('Modules'), t('List')));

  // Verify that MENU_VISIBLE_IN_BREADCRUMB items (exact type) do NOT appear.
  $this->assertNoLinkTrailByTitle(array(t('Modules'), t('Uninstall'), t('Uninstall')));
}