function CommentModuleTestCase::get_unaproved_comment in SimpleTest 6
Get the comment id for an unaproved comment.
Parameters
string $subject Comment subject to find.:
Return value
integer Comment id.
1 call to CommentModuleTestCase::get_unaproved_comment()
- CommentModuleTestCase::testAnonymous in tests/
comment_module.test - Test anonymous comment functionality.
File
- tests/
comment_module.test, line 370
Class
Code
function get_unaproved_comment($subject) {
$this
->drupalGet('admin/content/comment/approval');
preg_match('/href="(.*?)#comment-([^"]+)"(.*?)>(' . $subject . ')/', $this
->drupalGetContent(), $match);
return $match[2];
}