diff --git a/core/modules/simpletest/simpletest.module b/core/modules/simpletest/simpletest.module index dc93d42..410cc4f 100644 --- a/core/modules/simpletest/simpletest.module +++ b/core/modules/simpletest/simpletest.module @@ -331,7 +331,7 @@ function simpletest_phpunit_run_command(array $unescaped_test_classnames, $phpun // this variable. if ($base_url) { putenv('SIMPLETEST_BASE_URL=' . $base_url); - putenv('BROWSERTEST_OUTPUT_DIRECTORY=' . Drupal::service('file_system')->realpath('public://simpletest')); + putenv('BROWSERTEST_OUTPUT_DIRECTORY=' . \Drupal::service('file_system')->realpath('public://simpletest')); } $phpunit_bin = simpletest_phpunit_command(); diff --git a/core/modules/simpletest/src/Tests/UiPhpUnitOutputTest.php b/core/modules/simpletest/src/Tests/UiPhpUnitOutputTest.php new file mode 100644 index 0000000..8f8b6c5 --- /dev/null +++ b/core/modules/simpletest/src/Tests/UiPhpUnitOutputTest.php @@ -0,0 +1,43 @@ +realpath('public://phpunit_junit.xml'); + // Prepare the default browser test output directory in the child site. + \Drupal::service('file_system')->mkdir('public://simpletest'); + $status = 0; + $output = []; + simpletest_phpunit_run_command([SimpletestPhpunitBrowserTest::class], $phpunit_junit_file, $status, $output); + + $this->verbose(print_r($output, TRUE)); + + // Check that there are
tags for the HTML output by + // SimpletestUiPrinter. + $this->assertEqual($output[9], 'HTML output was generated
'); + // Check that URLs are printed as HTML links. + $this->assertIdentical(strpos($output[10], '