function MenuRouterTestCase::menuItemTitlesCasesHelper

Get a URL and assert the title given a case number. If override is true, the title is asserted to begin with "Alternative".

1 call to MenuRouterTestCase::menuItemTitlesCasesHelper()
MenuRouterTestCase::testMenuItemTitlesCases in modules/simpletest/tests/menu.test
Tests the possible ways to set the title for menu items. Also tests that menu item titles work with string overrides.

File

modules/simpletest/tests/menu.test, line 605

Class

MenuRouterTestCase

Code

private function menuItemTitlesCasesHelper($case_no, $override = FALSE) {
    $this->drupalGet('menu-title-test/case' . $case_no);
    $this->assertResponse(200);
    $asserted_title = $override ? 'Alternative example title - Case ' . $case_no : 'Example title - Case ' . $case_no;
    $this->assertTitle($asserted_title . ' | Drupal', format_string('Menu title is: %title.', array(
        '%title' => $asserted_title,
    )), 'Menu');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.