You are here

function CommentModuleTestCase::setUp in SimpleTest 6

File

tests/comment_module.test, line 17

Class

CommentModuleTestCase

Code

function setUp() {
  parent::setUp();
  $this
    ->drupalModuleEnable('comment');

  // Create users.
  $this->admin_user = $this
    ->drupalCreateUserRolePerm(array(
    'administer content types',
    'administer comments',
    'administer permissions',
  ));
  $this->web_user = $this
    ->drupalCreateUserRolePerm(array(
    'access comments',
    'post comments',
    'create story content',
  ));
  $this
    ->drupalLoginUser($this->web_user);
  $this->node = $this
    ->drupalCreateNode(array(
    'type' => 'story',
  ));
  $this
    ->assertTrue($this->node, 'Story node created.');
  $this
    ->drupalGet('logout');
}