function BlockTestCase::setUp

Overrides DrupalWebTestCase::setUp

File

modules/block/block.test, line 20

Class

BlockTestCase
@file Tests for block.module.

Code

function setUp() {
    parent::setUp();
    // Create and log in an administrative user having access to the Full HTML
    // text format.
    $full_html_format = filter_format_load('full_html');
    $this->admin_user = $this->drupalCreateUser(array(
        'administer blocks',
        filter_permission_name($full_html_format),
        'access administration pages',
    ));
    $this->drupalLogin($this->admin_user);
    // Define the existing regions
    $this->regions = array();
    $this->regions[] = 'header';
    $this->regions[] = 'sidebar_first';
    $this->regions[] = 'content';
    $this->regions[] = 'sidebar_second';
    $this->regions[] = 'footer';
}

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