function MenuBreadcrumbTestCase::setUp

Overrides MenuWebTestCase::setUp

File

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

Class

MenuBreadcrumbTestCase
Menu breadcrumbs related tests.

Code

function setUp() {
    $modules = func_get_args();
    if (isset($modules[0]) && is_array($modules[0])) {
        $modules = $modules[0];
    }
    $modules[] = 'menu_test';
    parent::setUp($modules);
    $perms = array_keys(module_invoke_all('permission'));
    $this->admin_user = $this->drupalCreateUser($perms);
    $this->drupalLogin($this->admin_user);
    // This test puts menu links in the Navigation menu and then tests for
    // their presence on the page, so we need to ensure that the Navigation
    // block will be displayed in all active themes.
    db_update('block')->fields(array(
        // Use a region that is valid for all themes.
'region' => 'content',
        'status' => 1,
    ))
        ->condition('module', 'system')
        ->condition('delta', 'navigation')
        ->execute();
}

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