class Generator
Same name in this branch
- 11.1.x vendor/phpunit/phpunit/src/Framework/MockObject/Generator/Generator.php \PHPUnit\Framework\MockObject\Generator\Generator
- 11.1.x vendor/phpunit/phpunit/src/Runner/Baseline/Generator.php \PHPUnit\Runner\Baseline\Generator
- 11.1.x vendor/squizlabs/php_codesniffer/src/Generators/Generator.php \PHP_CodeSniffer\Generators\Generator
@no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
@internal This class is not covered by the backward compatibility promise for PHPUnit
Hierarchy
- class \PHPUnit\TextUI\XmlConfiguration\Generator
Expanded class hierarchy of Generator
1 file declares its use of Generator
- GenerateConfigurationCommand.php in vendor/
phpunit/ phpunit/ src/ TextUI/ Command/ Commands/ GenerateConfigurationCommand.php
4 string references to 'Generator'
- BareHtmlPageRenderer::systemPageAttachments in core/
lib/ Drupal/ Core/ Render/ BareHtmlPageRenderer.php - Helper for system_page_attachments.
- Config::printPHPCSUsage in vendor/
squizlabs/ php_codesniffer/ src/ Config.php - Prints out the usage information for PHPCS.
- MethodProphecy::__construct in vendor/
phpspec/ prophecy/ src/ Prophecy/ Prophecy/ MethodProphecy.php - @internal
- ReturnValueGenerator::generate in vendor/
phpunit/ phpunit/ src/ Framework/ MockObject/ Runtime/ ReturnValueGenerator.php - @psalm-param class-string $className @psalm-param non-empty-string $methodName @psalm-param class-string $stubClassName
File
-
vendor/
phpunit/ phpunit/ src/ TextUI/ Configuration/ Xml/ Generator.php, line 19
Namespace
PHPUnit\TextUI\XmlConfigurationView source
final class Generator {
/**
* @var string
*/
private const TEMPLATE = <<<'EOT'
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/{phpunit_version}/phpunit.xsd"
bootstrap="{bootstrap_script}"
cacheDirectory="{cache_directory}"
executionOrder="depends,defects"
requireCoverageMetadata="true"
beStrictAboutCoverageMetadata="true"
beStrictAboutOutputDuringTests="true"
displayDetailsOnPhpunitDeprecations="true"
failOnPhpunitDeprecation="true"
failOnRisky="true"
failOnWarning="true">
<testsuites>
<testsuite name="default">
<directory>{tests_directory}</directory>
</testsuite>
</testsuites>
<source restrictDeprecations="true" restrictNotices="true" restrictWarnings="true">
<include>
<directory>{src_directory}</directory>
</include>
</source>
</phpunit>
EOT;
public function generateDefaultConfiguration(string $phpunitVersion, string $bootstrapScript, string $testsDirectory, string $srcDirectory, string $cacheDirectory) : string {
return str_replace([
'{phpunit_version}',
'{bootstrap_script}',
'{tests_directory}',
'{src_directory}',
'{cache_directory}',
], [
$phpunitVersion,
$bootstrapScript,
$testsDirectory,
$srcDirectory,
$cacheDirectory,
], self::TEMPLATE);
}
}
Members
Title Sort descending | Modifiers | Object type | Summary |
---|---|---|---|
Generator::generateDefaultConfiguration | public | function | |
Generator::TEMPLATE | private | constant |