protected 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 drupal/modules/system/system.test
Test if the date formats are stored properly.
DrupalHtmlToTextTestCase::assertHtmlToText in drupal/modules/simpletest/tests/mail.test
Helper function for testing drupal_html_to_text().
DrupalHtmlToTextTestCase::testDrupalHtmlToTextBlockTagToNewline in drupal/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 drupal/modules/simpletest/tests/common.test
DrupalWebTestCase::assertThemeOutput in drupal/modules/simpletest/drupal_web_test_case.php
Asserts themed output.

... See full list

File

drupal/modules/simpletest/drupal_web_test_case.php, line 468

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');
  }
}