function viewsHandlerArgumentCommentUserUidTest::postComment
3.x views_handler_argument_comment_user_uid.test | viewsHandlerArgumentCommentUserUidTest::postComment($node, $comment = array()) |
Post comment.
Parameters
$node: Node to post comment on.
$comment: Comment to save
1 call to viewsHandlerArgumentCommentUserUidTest::postComment()
- viewsHandlerArgumentCommentUserUidTest::setUp in tests/
comment/ views_handler_argument_comment_user_uid.test - Sets up a Drupal site for running functional and integration tests.
File
- tests/
comment/ views_handler_argument_comment_user_uid.test, line 28 - Definition of viewsHandlerArgumentCommentUserUidTest.
Class
- viewsHandlerArgumentCommentUserUidTest
- Tests the argument_comment_user_uid handler.
Code
function postComment($node, $comment = array()) {
$comment += array(
'uid' => $this->loggedInUser->uid,
'nid' => $node->nid,
'cid' => '',
'pid' => '',
);
return comment_save((object) $comment);
}