function AssertLegacyTrait::verbose

Same name in other branches
  1. 8.9.x core/tests/Drupal/KernelTests/AssertLegacyTrait.php \Drupal\KernelTests\AssertLegacyTrait::verbose()

Deprecated

in drupal:9.2.0 and is removed from drupal:10.0.0. Use dump() instead.

See also

\Drupal\simpletest\TestBase::verbose()

https://www.drupal.org/node/3197514

1 call to AssertLegacyTrait::verbose()
KernelTestBaseTest::testVerbose in core/tests/Drupal/KernelTests/KernelTestBaseTest.php
Tests the deprecation of AssertLegacyTrait::verbose().

File

core/tests/Drupal/KernelTests/AssertLegacyTrait.php, line 122

Class

AssertLegacyTrait
Translates Simpletest assertion methods to PHPUnit.

Namespace

Drupal\KernelTests

Code

protected function verbose($message) {
    @trigger_error('AssertLegacyTrait::verbose() is deprecated in drupal:9.2.0 and is removed from drupal:10.0.0. Use dump() instead. See https://www.drupal.org/node/3197514', E_USER_DEPRECATED);
    if (in_array('--debug', $_SERVER['argv'], TRUE)) {
        // Write directly to STDOUT to not produce unexpected test output.
        // The STDOUT stream does not obey output buffering.
        fwrite(STDOUT, $message . "\n");
    }
}

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