1 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

core/modules/comment/tests/comment.test, line 319
Tests for the Comment module.

Class

CommentHelperCase

Code

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

  return $match[2];
}