You are here

protected function MetatagFieldTestBase::verbose in Metatag 8

Overrides AssertLegacyTrait::verbose

See also

\Drupal\simpletest\TestBase::verbose()

1 call to MetatagFieldTestBase::verbose()
MetatagFieldTestBase::tofixTestEntityField in tests/src/Functional/MetatagFieldTestBase.php
Tests adding and editing values on a given entity type.

File

tests/src/Functional/MetatagFieldTestBase.php, line 152

Class

MetatagFieldTestBase
Base class for ensuring that the Metatag field works correctly.

Namespace

Drupal\Tests\metatag\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);
}