protected function CommerceBrowserTestTrait::saveHtmlOutput in Commerce Core 8.2
Debugger method to save additional HTML output.
The base class will only save browser output when accessing page using ::drupalGet and providing a printer class to PHPUnit. This method is intended for developers to help debug browser test failures and capture more verbose output.
3 calls to CommerceBrowserTestTrait::saveHtmlOutput()
- AddressBookTest::testFallback in modules/
order/ tests/ src/ FunctionalJavascript/ AddressBookTest.php - Tests the fallback to the default profile UI.
- CustomerProfileTest::testMultipleNew in modules/
order/ tests/ src/ FunctionalJavascript/ CustomerProfileTest.php - Tests the address book in "multiple" mode, on a new profile entity.
- StoreTypeTest::testDelete in modules/
store/ tests/ src/ Functional/ StoreTypeTest.php - Tests deleting a product type.
File
- tests/
src/ Traits/ CommerceBrowserTestTrait.php, line 65
Class
- CommerceBrowserTestTrait
- Provides a trait for Commerce functional tests.
Namespace
Drupal\Tests\commerce\TraitsCode
protected function saveHtmlOutput() {
$out = $this
->getSession()
->getPage()
->getContent();
// Ensure that any changes to variables in the other thread are picked up.
$this
->refreshVariables();
if ($this->htmlOutputEnabled) {
$html_output = '<hr />Ending URL: ' . $this
->getSession()
->getCurrentUrl();
$html_output .= '<hr />' . $out;
$html_output .= $this
->getHtmlOutputHeaders();
$this
->htmlOutput($html_output);
}
}