Problem/Motivation
A simple grep shows sometimes we use browser output directory as absolute path and sometimes relative. We should consolidate how we want to use it.
grep -inr browser_output core/
core/tests/Drupal/Tests/Listeners/HtmlOutputPrinterTrait.php:37: $this->browserOutputFile = tempnam($html_output_directory, 'browser_output_');
core/tests/Drupal/Tests/BrowserHtmlDebugTrait.php:121: $uri = $GLOBALS['base_url'] . '/sites/simpletest/browser_output/' . $html_output_filename;
core/tests/Drupal/Tests/BrowserHtmlDebugTrait.php:132: $browser_output_file = getenv('BROWSERTEST_OUTPUT_FILE');
core/tests/Drupal/Tests/BrowserHtmlDebugTrait.php:133: $this->htmlOutputEnabled = is_file($browser_output_file);
core/tests/Drupal/Tests/BrowserHtmlDebugTrait.php:135: $this->htmlOutputFile = $browser_output_file;
core/tests/Drupal/Tests/BrowserHtmlDebugTrait.php:137: $this->htmlOutputDirectory = DRUPAL_ROOT . '/sites/simpletest/browser_output';
core/phpunit.xml.dist:29: <!-- Example BROWSERTEST_OUTPUT_DIRECTORY value: /path/to/webroot/sites/simpletest/browser_output -->
Also see https://gitlab.com/weitzman/drupal-test-traits/merge_requests/39
the html files are not going into the BROWSERTEST_OUTPUT_DIRECTORY. instead they are going into /sites/simpletest/browser_output regardless.
Proposed resolution
We can convert BROWSERTEST_OUTPUT_DIRECTORY
to always be relative webroot and convert to absolute/url when needs be that would mean \Drupal\Tests\Listeners\HtmlOutputPrinterTrait::setUpHtmlOutput
has to adapt.
Remaining tasks
- Agree on the approach.
- Create patch.
- Commit it.
- Rejoice.
User interface changes
None
API changes
None
Data model changes
None.