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 modules/
comment/ comment.test - Test comment approval functionality through admin/content/comment.
- CommentApprovalTest::testApprovalNodeInterface in modules/
comment/ comment.test - Test comment approval functionality through node interface.
File
-
modules/
comment/ comment.test, line 257
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];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.