1.20.x backdrop_web_test_case.php | BackdropWebTestCase::assertWatchdogMessage($watchdog_message, $variables, $message) |
Verifies that a watchdog message has been entered.
@since 1.19.0 Method added.
Parameters
$watchdog_message: The watchdog message.
$variables: The array of variables passed to watchdog().
$message: The assertion message.
File
- modules/
simpletest/ backdrop_web_test_case.php, line 4000
Class
- BackdropWebTestCase
- Test case for typical Backdrop tests.
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)));
}