protected function WebformBrowserTestTrait::debug in Webform 6.x
Same name and namespace in other branches
- 8.5 tests/src/Traits/WebformBrowserTestTrait.php \Drupal\Tests\webform\Traits\WebformBrowserTestTrait::debug()
Logs verbose (debug) message in a text file.
Parameters
mixed $data: Data to be output.
14 calls to WebformBrowserTestTrait::debug()
- WebformBrowserTestTrait::getLastEmail in tests/
src/ Traits/ WebformBrowserTestTrait.php - Gets that last email sent during the currently running test case.
- WebformCompositeFormatTest::testFormat in tests/
src/ Functional/ Composite/ WebformCompositeFormatTest.php - Tests element format.
- WebformElementAddressTest::testAddress in tests/
src/ Functional/ Element/ WebformElementAddressTest.php - Tests address element.
- WebformElementComputedTest::testComputedElement in tests/
src/ Functional/ Element/ WebformElementComputedTest.php - Test computed elements.
- WebformElementFormatCustomTest::testFormatCustom in tests/
src/ Functional/ Element/ WebformElementFormatCustomTest.php - Tests element custom format.
File
- tests/
src/ Traits/ WebformBrowserTestTrait.php, line 488
Class
- WebformBrowserTestTrait
- Provides convenience methods for webform assertions in browser tests.
Namespace
Drupal\Tests\webform\TraitsCode
protected function debug($data) {
$string = var_export($data, TRUE);
$string = preg_replace('/=>\\s*array\\s*\\(/', '=> array(', $string);
$this
->htmlOutput('<pre>' . htmlentities($string) . '</pre>');
}