Logs verbose message in a text file.
The a link to the vebose message will be placed in the test results via as a passing assertion with the text '[verbose message]'.
$message: The verbose message to be stored.
simpletest_verbose()
protected function verbose($message) {
// Do nothing if verbose debugging is disabled.
if (!$this->verbose) {
return;
}
$message = '<hr />ID #' . $this->verboseId . ' (<a href="' . $this->verboseClassName . '-' . ($this->verboseId - 1) . '.html">Previous</a> | <a href="' . $this->verboseClassName . '-' . ($this->verboseId + 1) . '.html">Next</a>)<hr />' . $message;
$verbose_filename = $this->verboseDirectory . '/' . $this->verboseClassName . '-' . $this->verboseId . '.html';
if (file_put_contents($verbose_filename, $message, FILE_APPEND)) {
$url = $this->verboseDirectoryUrl . '/' . $this->verboseClassName . '-' . $this->verboseId . '.html';
// Not using l() to avoid invoking the theme system, so that unit tests
// can use verbose() as well.
$url = '<a href="' . $url . '" target="_blank">' . t('Verbose message') . '</a>';
$this
->error($url, 'User notice');
}
$this->verboseId++;
}