1 menu.test MenuRouterTestCase::testMenuItemTitlesCases()

Tests the possible ways to set the title for menu items. Also tests that menu item titles work with string overrides.

See also

menu_test_init()

File

core/modules/simpletest/tests/menu.test, line 512
Provides SimpleTests for menu.inc.

Class

MenuRouterTestCase

Code

function testMenuItemTitlesCases() {
  for ($case_no = 1; $case_no <= 4; $case_no++) {
    $this->backdropGet('menu-title-test/case' . $case_no);
    $this->assertResponse(200);
    $asserted_title = 'Alternative example title - Case ' . $case_no;
    $this->assertTitle($asserted_title . ' | Backdrop CMS', 'Menu title is: ' . $asserted_title, 'Menu');
  }
}