function CommentActionsTestCase::assertWatchdogMessage

7.x comment.test CommentActionsTestCase::assertWatchdogMessage($watchdog_message, $variables, $message)

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.

1 call to CommentActionsTestCase::assertWatchdogMessage()
CommentActionsTestCase::testCommentPublishUnpublishActions in drupal-7.x/modules/comment/comment.test
Test comment publish and unpublish actions.

File

drupal-7.x/modules/comment/comment.test, line 1986
Tests for comment.module.

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)));
}