function FrontPageTestCase::setUp

Overrides DrupalWebTestCase::setUp

File

modules/system/system.test, line 1703

Class

FrontPageTestCase
Test front page functionality and administration.

Code

function setUp() {
    parent::setUp('system_test');
    // Create admin user, log in admin user, and create one node.
    $this->admin_user = $this->drupalCreateUser(array(
        'access content',
        'administer site configuration',
    ));
    $this->drupalLogin($this->admin_user);
    $this->node_path = "node/" . $this->drupalCreateNode(array(
        'promote' => 1,
    ))->nid;
    // Enable front page logging in system_test.module.
    variable_set('front_page_output', 1);
}

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