function DrupalTestCase::verbose

Logs a verbose message in a text file.

The link to the verbose message will be placed in the test results as a passing assertion with the text '[verbose message]'.

Parameters

$message: The verbose message to be stored.

See also

simpletest_verbose()

15 calls to DrupalTestCase::verbose()
DateTimeFunctionalTest::testDateFormatStorage in modules/system/system.test
Test if the date formats are stored properly.
DrupalHtmlToTextTestCase::assertHtmlToText in modules/simpletest/tests/mail.test
Helper function for testing drupal_html_to_text().
DrupalHtmlToTextTestCase::testDrupalHtmlToTextBlockTagToNewline in modules/simpletest/tests/mail.test
Test that text separated by block-level tags in HTML get separated by (at least) a newline in the plaintext version.
DrupalRenderTestCase::assertRenderedElement in modules/simpletest/tests/common.test
DrupalWebTestCase::assertThemeOutput in modules/simpletest/drupal_web_test_case.php
Asserts themed output.

... See full list

File

modules/simpletest/drupal_web_test_case.php, line 507

Class

DrupalTestCase
Base class for Drupal tests.

Code

protected function verbose($message) {
    if ($id = simpletest_verbose($message)) {
        $class_safe = str_replace('\\', '_', get_class($this));
        $url = $this->verboseDirectoryUrl . '/' . $class_safe . '-' . $id . '.html';
        // Not using l() to avoid invoking the theme system, so that unit tests
        // can use verbose() as well.
        $link = '<a href="' . $url . '" target="_blank">' . t('Verbose message') . '</a>';
        $this->error($link, 'User notice');
    }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.