You are here

function TokenCommentTestCase::createComment in Token 6

1 call to TokenCommentTestCase::createComment()
TokenCommentTestCase::testCommentTokens in ./token.test

File

./token.test, line 361
Tests for the token module.

Class

TokenCommentTestCase

Code

function createComment(array $comment) {
  $comment += array(
    'cid' => 0,
    'nid' => $this->node->nid,
    'pid' => 0,
    'uid' => 0,
    'subject' => $this
      ->randomName(),
    'comment' => $this
      ->randomName(64),
    'format' => 1,
    'timestamp' => gmmktime(0, 0, 0, 7, 4, 1984),
    'status' => COMMENT_PUBLISHED,
  );
  $cid = comment_save($comment);
  return $this
    ->loadComment($cid);
}