function CommentActionsTestCase::assertHookMessage

Pass if the message $text was set by one of the comment hooks in comment_hook_test.module, i.e., if the $text is an element of $_SESSION['comment_hook_test'].

Parameters

$text: Plain text to look for.

$message: Message to display.

$group: The group this message belongs to, defaults to 'Other'.

Return value

TRUE on pass, FALSE on fail.

1 call to CommentActionsTestCase::assertHookMessage()
CommentActionsTestCase::testCommentPublishUnpublishHooks in modules/comment/comment.test
Test comment publish and unpublish hooks.

File

modules/comment/comment.test, line 2098

Class

CommentActionsTestCase
Test actions provided by the comment module.

Code

protected function assertHookMessage($text, $message = NULL, $group = 'Other') {
    if (!isset($message)) {
        $message = $text;
    }
    return $this->assertTrue(array_search($text, $_SESSION['comment_hook_test']) !== FALSE, $message, $group);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.