Error message

You are browsing documentation for drupal 7.x, which is not supported anymore. Read the updated version of this page for drupal 11.x (the latest version).

function CommentActionsTestCase::assertWatchdogMessage

Verify that a watchdog message has been entered.

Parameters

$watchdog_message: The watchdog message.

$variables: The array of variables passed to watchdog().

$message: The assertion message.

2 calls to CommentActionsTestCase::assertWatchdogMessage()
CommentActionsTestCase::testCommentPublishUnpublishActions in modules/comment/comment.test
Test comment publish and unpublish actions.
CommentActionsTestCase::testCommentUnpublishByKeyword in modules/comment/comment.test
Tests the unpublish comment by keyword action.

File

modules/comment/comment.test, line 2072

Class

CommentActionsTestCase
Test actions provided by the comment module.

Code

function assertWatchdogMessage($watchdog_message, $variables, $message) {
 $status = (bool) db_query_range ("SELECT 1 FROM {watchdog} WHERE message = :message AND variables = :variables", 0, 1, array(
 ':message' => $watchdog_message,
 ':variables' => serialize ($variables),
 ))->fetchField ();
 return $this->assert ($status, format_string ('@message', array(
 '@message' => $message,
 )));
}

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