You are here

protected function ScannerHelperTrait::verbose in Search and Replace Scanner 8

File

tests/src/Functional/ScannerHelperTrait.php, line 39

Class

ScannerHelperTrait
Misc helper functions for the automated tests.

Namespace

Drupal\Tests\scanner\Functional

Code

protected function verbose($message, $title = NULL) {

  // Handle arrays, objects, etc.
  if (!is_string($message)) {
    $message = "<pre>\n" . print_r($message, TRUE) . "\n</pre>\n";
  }

  // Optional title to go before the output.
  if (!empty($title)) {
    $title = '<h2>' . Html::escape($title) . "</h2>\n";
  }
  parent::verbose($title . $message);
}