protected function ForumAccessBaseTestCase::createForumCommentWithText in Forum Access 7
1 call to ForumAccessBaseTestCase::createForumCommentWithText()
- ForumAccessBaseTestCase::checkForum in tests/
forum_access_test_base.php - Check the set of permissions in one forum.
File
- tests/
forum_access_test_base.php, line 335 - Base class with auxiliary functions for forum access module tests.
Class
- ForumAccessBaseTestCase
- Base test class for the Forum Access module.
Code
protected function createForumCommentWithText($node, $text) {
static $cid = 0;
$this
->drupalPost("node/{$node->nid}", array(
'comment_body[' . LANGUAGE_NONE . '][0][value]' => $text,
), t('Save'));
$this
->assertResponse(200);
$this
->assertText($text, "Comment '{$text}' found, too.");
return comment_load(++$cid);
}