Template phpunit.xml (ties test cases and suites into a single test suite) - Replace <string*> and with values, remove parts not needed, .... represents optional repeats.
<?xml version="1.0" encoding="UTF-8"?>
<phpunit>
<testsuite name="<string>">
<directory suffix=".<stringExtension>"><stringLocation></directory>
....
<file><stringPath></file>
....
<exclude><stringPath></exclude>
....
</testsuite>
<groups>
<include>
<group><stringName></group>
....
</include>
<exclude>
<group><stringName></group>
....
</exclude>
</groups>
<filter>
<whitelist>
<directory suffix=".<stringExtension>"><stringPath></directory>
....
<file><stringPath></file>
....
<exclude>
<directory suffix=".<stringExtension>"><stringPath></directory>
....
<file><stringPath></file>
....
</exclude>
</whitelist>
<blacklist>
<directory suffix=".<stringExtension>"><stringPath></directory>
....
<file><stringPath></file>
....
<exclude>
<directory suffix=".<stringExtension>"><stringPath></directory>
....
<file><stringPath></file>
....
</exclude>
</blacklist>
</filter>
<logging>
<log type="coverage-html" target="<stringPath>" />
<log type="coverage-clover" target="<stringPath>" />
<log type="coverage-php" target="<stringPath>" />
<log type="coverage-text" target="<stringPath>" />
<log type="json" target="<stringPath>" />
<log type="tap" target="<stringPath>" />
<log type="junit" target="<stringPath>" />
<log type="testdox-html" target="<stringPath>" />
<log type="testdox-text" target="<stringPath>" />
</logging>
<php>
<includePath><string></includePath>
<ini name="<string>" value="<string>"/>
....
<const name="<string>" value="<string>"/>
....
<var name="<string>" value="<string>"/>
....
<env name="<string>" value="<string>"/>
....
<post name="<string>" value="<string>"/>
....
<get name="<string>" value="<string>"/>
....
<cookie name="<string>" value="<string>"/>
....
<server name="<string>" value="<string>"/>
....
<files name="<string>" value="<string>"/>
....
<request name="<string>" value="<string>"/>
....
</php>
</phpunit>
- Testsuite tag -> Selecting tests to include
- Groups tag -> Selectively include / exclude groups of tests from this suite
- Filter tag -> Selectively include / exclude files for code coverage reporting
- Reporting tag -> Guess
- PHP tag children tags are for setting PHP settings, constants, and global variables.
=================
Optional PHPUnit tag attributes:
backupGlobals="<bool>"
backupStaticAttributes="<bool>"
cacheTokens="<bool>"
convertErrorsToExceptions="<bool>"
convertNoticesToExceptions="<bool>"
convertWarningsToExceptions="<bool>"
mapTestClassNameToCoveredClassName="<bool>"
printerClass="<stringClassname>"
printerFile="<stringPath>"
processIsolation="<bool>"
stopOnError="<bool>"
stopOnFailure="<bool>"
stopOnIncomplete="<bool>"
stopOnSkipped="<bool>"
testSuiteLoaderClass="<stringClassname>"
testSuiteLoaderFile="<stringPath>"
strict="<bool>"
verbose="<bool>"
bootstrap="<fileString>"
forceCoversAnnotation="<bool>"
colors="<bool>"
strict="<bool>"
Optional testsuite -> directory and testsuite -> file tag attributes:
phpVersion="<stringVersion>"
phpVersionOperator="<stringOperator>"
Optional whitelist tag attributes:
addUncoveredFilesFromWhitelist="<bool>"
Optional log tag attributes:
charset: Character set to be used for the generated HTML pages
highlight: When set to true, the code in your coverage reports is syntax highlighted.
lowUpperBound: Maximum coverage percentage to be considered "lowly" covered.
highLowerBound: Minimum coverage percentage to be considered "highly" covered.