1.20.x comment.test | CommentHelperCase::getUnapprovedComment($subject) |
Gets the comment ID for an unapproved comment.
Parameters
string $subject: Comment subject to find.
Return value
integer: Comment id.
File
- modules/
comment/ tests/ comment.test, line 319 - Tests for the Comment module.
Class
Code
function getUnapprovedComment($subject) {
$this->backdropGet('admin/content/comment/approval');
preg_match('/href="(.*?)#comment-([^"]+)"(.*?)>(' . $subject . ')/', $this->backdropGetContent(), $match);
return $match[2];
}