Pass if the message $text was set by one of the CRUD hooks in entity_crud_hook_test.module, i.e., if the $text is an element of $_SESSION['entity_crud_hook_test'].
$text: Plain text to look for.
$message: Message to display.
$group: The group this message belongs to, defaults to 'Other'.
TRUE on pass, FALSE on fail.
protected function assertHookMessage($text, $message = NULL, $group = 'Other') {
if (!isset($message)) {
$message = $text;
}
return $this
->assertTrue(array_search($text, $_SESSION['entity_crud_hook_test']) !== FALSE, $message, $group);
}