function UserSignatureTestCase::setUp

Overrides DrupalWebTestCase::setUp

File

modules/user/user.test, line 2341

Class

UserSignatureTestCase
Test case for user signatures.

Code

function setUp() {
    parent::setUp('comment');
    // Enable user signatures.
    variable_set('user_signatures', 1);
    // Prefetch text formats.
    $this->full_html_format = filter_format_load('full_html');
    $this->plain_text_format = filter_format_load('plain_text');
    // Create regular and administrative users.
    $this->web_user = $this->drupalCreateUser(array());
    $admin_permissions = array(
        'administer comments',
    );
    foreach (filter_formats() as $format) {
        if ($permission = filter_permission_name($format)) {
            $admin_permissions[] = $permission;
        }
    }
    $this->admin_user = $this->drupalCreateUser($admin_permissions);
}

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