function CommentNodeAccessTest::setUp

Overrides CommentHelperCase::setUp

File

modules/comment/comment.test, line 1512

Class

CommentNodeAccessTest
Tests comments with node access.

Code

function setUp() {
  parent::setUp('search', 'node_access_test');
  node_access_rebuild();
  // Create users and test node.
  $this->admin_user = $this->drupalCreateUser(array(
    'administer content types',
    'administer comments',
    'administer blocks',
  ));
  $this->web_user = $this->drupalCreateUser(array(
    'access comments',
    'post comments',
    'create article content',
    'edit own comments',
    'node test view',
  ));
  $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.