function CommentHelperCase::getUnapprovedComment

Get the comment ID for an unapproved comment.

Parameters

string $subject: Comment subject to find.

Return value

integer Comment id.

2 calls to CommentHelperCase::getUnapprovedComment()
CommentApprovalTest::testApprovalAdminInterface in drupal/modules/comment/comment.test
Test comment approval functionality through admin/content/comment.
CommentApprovalTest::testApprovalNodeInterface in drupal/modules/comment/comment.test
Test comment approval functionality through node interface.

File

drupal/modules/comment/comment.test, line 255
Tests for comment.module.

Class

CommentHelperCase
@file Tests for comment.module.

Code

function getUnapprovedComment($subject) {
  $this
    ->drupalGet('admin/content/comment/approval');
  preg_match('/href="(.*?)#comment-([^"]+)"(.*?)>(' . $subject . ')/', $this
    ->drupalGetContent(), $match);
  return $match[2];
}