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

Verifies 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.

File

core/modules/comment/tests/comment.test, line 1988
Tests for the Comment module.

Class

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