function BookTestCase::setUp

Overrides DrupalWebTestCase::setUp

File

modules/book/book.test, line 49

Class

BookTestCase
Tests the functionality of the Book module.

Code

function setUp() {
    parent::setUp(array(
        'book',
        'node_access_test',
    ));
    // node_access_test requires a node_access_rebuild().
    node_access_rebuild();
    // Create users.
    $this->book_author = $this->drupalCreateUser(array(
        'create new books',
        'create book content',
        'edit own book content',
        'add content to books',
    ));
    $this->web_user = $this->drupalCreateUser(array(
        'access printer-friendly version',
        'node test view',
    ));
    $this->admin_user = $this->drupalCreateUser(array(
        'create new books',
        'create book content',
        'edit own book content',
        'add content to books',
        'administer blocks',
        'administer permissions',
        'administer book outlines',
        'node test view',
    ));
}

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