DOKK / manpages / debian 10 / phpunit / phpunit.1.en
PHPUNIT(1) User Commands PHPUNIT(1)

phpunit - PHPUnit command line interface

phpunit [options] UnitTest [UnitTest.php]
phpunit [options] <directory>

Code Coverage Options:

Generate code coverage report in Clover XML format
Generate code coverage report in Crap4J XML format
Generate code coverage report in HTML format
Export PHP_CodeCoverage object to file
Generate code coverage report in text format Default: Standard output
Generate code coverage report in PHPUnit XML format
Whitelist <dir> for code coverage analysis
Disable annotations for ignoring code coverage
Ignore code coverage configuration

--dump-xdebug-filter <file> Generate script to set Xdebug code coverage filter

Logging Options:

Log test execution in JUnit XML format to file
Log test execution in TeamCity format to file
Write agile documentation in HTML format to file
Write agile documentation in Text format to file
Write agile documentation in XML format to file
Print defects in reverse order

Test Selection Options:

Filter which tests to run
Filter which testsuite to run
Only runs tests from the specified group(s)
Exclude tests from the specified group(s)
List available test groups
List available test suites
List available tests
List available tests in XML format
Only search for test in files with specified suffix(es). Default: Test.php,.phpt

Test Execution Options:

--dont-report-useless-tests Do not report tests that do not test anything

Be strict about @covers annotation usage
Be strict about changes to global state
Be strict about output during tests
Be strict about resource usage during small tests
Enforce time limit based on test size
Timeout in seconds for tests without @small, @medium or @large
Disallow @todo-annotated tests
Run each test in a separate PHP process
Backup and restore $GLOBALS for each test
Backup and restore static attributes for each test
Use colors in output ("never", "auto" or "always")
Number of columns to use for progress output
Use maximum number of columns for progress output
Write to STDERR instead of STDOUT
Stop execution upon first not-passed test
Stop execution upon first error
Stop execution upon first error or failure
Stop execution upon first warning
Stop execution upon first risky test
Stop execution upon first skipped test
Stop execution upon first incomplete test
Treat tests with warnings as failures
Treat risky tests as failures
Output more verbose information
Display debugging information
TestSuiteLoader implementation to use
Runs the test(s) repeatedly
Report test execution progress in TeamCity format
Report test execution progress in TestDox format
Only include tests from the specified group(s)
Exclude tests from the specified group(s)
TestListener implementation to use
Resolve dependencies between tests
Run tests in order: default|reverse|random|defects|depends
Use a specific random seed <N> for random order
Write run result to cache to enable ordering tests defects-first

Configuration Options:

A PHP script that is included as early as possible
A PHP script that is included before the tests run
Read configuration from XML file
Ignore default configuration file (phpunit.xml)
Ignore logging configuration
Do not load PHPUnit extensions
Prepend PHP's include_path with given path(s)
Sets a php.ini value
Generate configuration file with suggested settings
Specify result cache path and filename

Miscellaneous Options:

Prints this usage information
Prints the version and exits
Checks that version is greater than min and exits
Check whether PHPUnit is the latest version
February 2019 phpunit 7.5.6