function CommentHelperCase::setUp

Overrides DrupalWebTestCase::setUp

3 calls to CommentHelperCase::setUp()
CommentAnonymous::setUp in modules/comment/comment.test
Sets up a Drupal site for running functional and integration tests.
CommentNodeAccessTest::setUp in modules/comment/comment.test
Sets up a Drupal site for running functional and integration tests.
RdfCommentAttributesTestCase::setUp in modules/rdf/rdf.test
Sets up a Drupal site for running functional and integration tests.
3 methods override CommentHelperCase::setUp()
CommentAnonymous::setUp in modules/comment/comment.test
Sets up a Drupal site for running functional and integration tests.
CommentNodeAccessTest::setUp in modules/comment/comment.test
Sets up a Drupal site for running functional and integration tests.
RdfCommentAttributesTestCase::setUp in modules/rdf/rdf.test
Sets up a Drupal site for running functional and integration tests.

File

modules/comment/comment.test, line 14

Class

CommentHelperCase
@file Tests for comment.module.

Code

function setUp() {
    $modules = func_get_args();
    if (isset($modules[0]) && is_array($modules[0])) {
        $modules = $modules[0];
    }
    $modules[] = 'comment';
    parent::setUp($modules);
    // Create users and test node.
    $this->super_user = $this->drupalCreateUser(array(
        'access administration pages',
        'administer modules',
    ));
    $this->admin_user = $this->drupalCreateUser(array(
        'administer content types',
        'administer comments',
        'administer blocks',
        'administer actions',
        'administer fields',
    ));
    $this->web_user = $this->drupalCreateUser(array(
        'access comments',
        'post comments',
        'create article content',
        'edit own comments',
    ));
    $this->node = $this->drupalCreateNode(array(
        'type' => 'article',
        'promote' => 1,
        'uid' => $this->web_user->uid,
    ));
}

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