function FunctionalTestDebugHtmlOutputTest::getAlteredPhpunitXmlConfigurationFile
1 call to FunctionalTestDebugHtmlOutputTest::getAlteredPhpunitXmlConfigurationFile()
- FunctionalTestDebugHtmlOutputTest::testFunctionalTestDebugHtmlOutput in core/
tests/ Drupal/ FunctionalTests/ Test/ FunctionalTestDebugHtmlOutputTest.php - Ensures that functional tests produce debug HTML output when required.
File
-
core/
tests/ Drupal/ FunctionalTests/ Test/ FunctionalTestDebugHtmlOutputTest.php, line 177
Class
- FunctionalTestDebugHtmlOutputTest
- Test to ensure that functional tests produce debug HTML output when required.
Namespace
Drupal\FunctionalTests\TestCode
private function getAlteredPhpunitXmlConfigurationFile(array|string $search, array|string $replace) : string {
$fileSystem = \Drupal::service('file_system');
$copiedConfigFile = $fileSystem->tempnam($this->root . \DIRECTORY_SEPARATOR . 'core', 'pux');
$fileSystem->copy($this->root . \DIRECTORY_SEPARATOR . 'core' . \DIRECTORY_SEPARATOR . 'phpunit.xml.dist', $copiedConfigFile, FileExists::Replace);
$content = file_get_contents($copiedConfigFile);
$content = str_replace($search, $replace, $content);
file_put_contents($copiedConfigFile, $content);
return $fileSystem->realpath($copiedConfigFile);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.