Loading core/phpunit.xml.dist +5 −0 Changes for core/phpunit.xml.dist: 5 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -21,6 +21,11 @@ <env name="SIMPLETEST_DB" value=""/> <!-- Example BROWSERTEST_OUTPUT_DIRECTORY value: /path/to/webroot/sites/simpletest/browser_output --> <env name="BROWSERTEST_OUTPUT_DIRECTORY" value=""/> <!-- To have browsertest output use an alternative base URL. For example if SIMPLETEST_BASE_URL is an internal DDEV URL, you can set this to the external DDev URL so you can follow the links directly. --> <env name="BROWSERTEST_OUTPUT_BASE_URL" value=""/> <!-- To disable deprecation testing completely uncomment the next line. --> <!-- <env name="SYMFONY_DEPRECATIONS_HELPER" value="disabled"/> --> <!-- Example for changing the driver class for mink tests MINK_DRIVER_CLASS value: 'Drupal\FunctionalJavascriptTests\DrupalSelenium2Driver' --> Loading core/tests/Drupal/Tests/BrowserHtmlDebugTrait.php +9 −1 Changes for core/tests/Drupal/Tests/BrowserHtmlDebugTrait.php: 9 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -65,6 +65,13 @@ trait BrowserHtmlDebugTrait { */ protected $htmlOutputTestId; /** * The Base URI to use for links to the output files. * * @var string */ protected $htmlOutputBaseUrl; /** * Formats HTTP headers as string for HTML output logging. * Loading Loading @@ -118,7 +125,7 @@ protected function htmlOutput($message = NULL) { file_put_contents($this->htmlOutputCounterStorage, $this->htmlOutputCounter++); // Do not use file_create_url() as the module_handler service might not be // available. $uri = $GLOBALS['base_url'] . '/sites/simpletest/browser_output/' . $html_output_filename; $uri = $this->htmlOutputBaseUrl . '/sites/simpletest/browser_output/' . $html_output_filename; file_put_contents($this->htmlOutputFile, $uri . "\n", FILE_APPEND); } Loading @@ -131,6 +138,7 @@ protected function htmlOutput($message = NULL) { protected function initBrowserOutputFile() { $browser_output_file = getenv('BROWSERTEST_OUTPUT_FILE'); $this->htmlOutputEnabled = is_file($browser_output_file); $this->htmlOutputBaseUrl = getenv('BROWSERTEST_OUTPUT_BASE_URL') ?: $GLOBALS['base_url']; if ($this->htmlOutputEnabled) { $this->htmlOutputFile = $browser_output_file; $this->htmlOutputClassName = str_replace("\\", "_", get_called_class()); Loading Loading
core/phpunit.xml.dist +5 −0 Changes for core/phpunit.xml.dist: 5 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -21,6 +21,11 @@ <env name="SIMPLETEST_DB" value=""/> <!-- Example BROWSERTEST_OUTPUT_DIRECTORY value: /path/to/webroot/sites/simpletest/browser_output --> <env name="BROWSERTEST_OUTPUT_DIRECTORY" value=""/> <!-- To have browsertest output use an alternative base URL. For example if SIMPLETEST_BASE_URL is an internal DDEV URL, you can set this to the external DDev URL so you can follow the links directly. --> <env name="BROWSERTEST_OUTPUT_BASE_URL" value=""/> <!-- To disable deprecation testing completely uncomment the next line. --> <!-- <env name="SYMFONY_DEPRECATIONS_HELPER" value="disabled"/> --> <!-- Example for changing the driver class for mink tests MINK_DRIVER_CLASS value: 'Drupal\FunctionalJavascriptTests\DrupalSelenium2Driver' --> Loading
core/tests/Drupal/Tests/BrowserHtmlDebugTrait.php +9 −1 Changes for core/tests/Drupal/Tests/BrowserHtmlDebugTrait.php: 9 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -65,6 +65,13 @@ trait BrowserHtmlDebugTrait { */ protected $htmlOutputTestId; /** * The Base URI to use for links to the output files. * * @var string */ protected $htmlOutputBaseUrl; /** * Formats HTTP headers as string for HTML output logging. * Loading Loading @@ -118,7 +125,7 @@ protected function htmlOutput($message = NULL) { file_put_contents($this->htmlOutputCounterStorage, $this->htmlOutputCounter++); // Do not use file_create_url() as the module_handler service might not be // available. $uri = $GLOBALS['base_url'] . '/sites/simpletest/browser_output/' . $html_output_filename; $uri = $this->htmlOutputBaseUrl . '/sites/simpletest/browser_output/' . $html_output_filename; file_put_contents($this->htmlOutputFile, $uri . "\n", FILE_APPEND); } Loading @@ -131,6 +138,7 @@ protected function htmlOutput($message = NULL) { protected function initBrowserOutputFile() { $browser_output_file = getenv('BROWSERTEST_OUTPUT_FILE'); $this->htmlOutputEnabled = is_file($browser_output_file); $this->htmlOutputBaseUrl = getenv('BROWSERTEST_OUTPUT_BASE_URL') ?: $GLOBALS['base_url']; if ($this->htmlOutputEnabled) { $this->htmlOutputFile = $browser_output_file; $this->htmlOutputClassName = str_replace("\\", "_", get_called_class()); Loading