• internal This class is not covered by the backward compatibility promise for PHPUnit
CloneableFinalInstantiable
Methods
public __construct(?int $width = NULL, ?bool $withColor = NULL)
public writeToConsole() : void
 
Write the help file to the CLI, adapting width and colors to the console

Constants
private PHPUnit\TextUI\Help::HELP_TEXT = [[['phpunit [options] UnitTest [UnitTest.php]'], ['phpunit [options] ']], 'Code Coverage Options' => [['--coverage-clover ', 'desc' => 'Generate code coverage report in Clover XML format'], ['--coverage-crap4j ', 'desc' => 'Generate code coverage report in Crap4J XML format'], ['--coverage-html ', 'desc' => 'Generate code coverage report in HTML format'], ['--coverage-php ', 'desc' => 'Export PHP_CodeCoverage object to file'], ['--coverage-text=', 'desc' => 'Generate code coverage report in text format [default: standard output]'], ['--coverage-xml ', 'desc' => 'Generate code coverage report in PHPUnit XML format'], ['--whitelist ', 'desc' => 'Whitelist for code coverage analysis'], ['--disable-coverage-ignore', 'desc' => 'Disable annotations for ignoring code coverage'], ['--no-coverage', 'desc' => 'Ignore code coverage configuration'], ['--dump-xdebug-filter ', 'desc' => 'Generate script to set Xdebug code coverage filter']], 'Logging Options' => [['--log-junit ', 'desc' => 'Log test execution in JUnit XML format to file'], ['--log-teamcity ', 'desc' => 'Log test execution in TeamCity format to file'], ['--testdox-html ', 'desc' => 'Write agile documentation in HTML format to file'], ['--testdox-text ', 'desc' => 'Write agile documentation in Text format to file'], ['--testdox-xml ', 'desc' => 'Write agile documentation in XML format to file'], ['--reverse-list', 'desc' => 'Print defects in reverse order']], 'Test Selection Options' => [['--filter ', 'desc' => 'Filter which tests to run'], ['--testsuite ', 'desc' => 'Filter which testsuite to run'], ['--group ', 'desc' => 'Only runs tests from the specified group(s)'], ['--exclude-group ', 'desc' => 'Exclude tests from the specified group(s)'], ['--list-groups', 'desc' => 'List available test groups'], ['--list-suites', 'desc' => 'List available test suites'], ['--list-tests', 'desc' => 'List available tests'], ['--list-tests-xml ', 'desc' => 'List available tests in XML format'], ['--test-suffix ', 'desc' => 'Only search for test in files with specified suffix(es). Default: Test.php,.phpt']], 'Test Execution Options' => [['--dont-report-useless-tests', 'desc' => 'Do not report tests that do not test anything'], ['--strict-coverage', 'desc' => 'Be strict about @covers annotation usage'], ['--strict-global-state', 'desc' => 'Be strict about changes to global state'], ['--disallow-test-output', 'desc' => 'Be strict about output during tests'], ['--disallow-resource-usage', 'desc' => 'Be strict about resource usage during small tests'], ['--enforce-time-limit', 'desc' => 'Enforce time limit based on test size'], ['--default-time-limit=', 'desc' => 'Timeout in seconds for tests without @small, @medium or @large'], ['--disallow-todo-tests', 'desc' => 'Disallow @todo-annotated tests'], [''], ['--process-isolation', 'desc' => 'Run each test in a separate PHP process'], ['--globals-backup', 'desc' => 'Backup and restore $GLOBALS for each test'], ['--static-backup', 'desc' => 'Backup and restore static attributes for each test'], [''], ['--colors=', 'desc' => 'Use colors in output ("never", "auto" or "always")'], ['--columns ', 'desc' => 'Number of columns to use for progress output'], ['--columns max', 'desc' => 'Use maximum number of columns for progress output'], ['--stderr', 'desc' => 'Write to STDERR instead of STDOUT'], ['--stop-on-defect', 'desc' => 'Stop execution upon first not-passed test'], ['--stop-on-error', 'desc' => 'Stop execution upon first error'], ['--stop-on-failure', 'desc' => 'Stop execution upon first error or failure'], ['--stop-on-warning', 'desc' => 'Stop execution upon first warning'], ['--stop-on-risky', 'desc' => 'Stop execution upon first risky test'], ['--stop-on-skipped', 'desc' => 'Stop execution upon first skipped test'], ['--stop-on-incomplete', 'desc' => 'Stop execution upon first incomplete test'], ['--fail-on-warning', 'desc' => 'Treat tests with warnings as failures'], ['--fail-on-risky', 'desc' => 'Treat risky tests as failures'], ['-v|--verbose', 'desc' => 'Output more verbose information'], ['--debug', 'desc' => 'Display debugging information'], [''], ['--loader ', 'desc' => 'TestSuiteLoader implementation to use'], ['--repeat ', 'desc' => 'Runs the test(s) repeatedly'], ['--teamcity', 'desc' => 'Report test execution progress in TeamCity format'], ['--testdox', 'desc' => 'Report test execution progress in TestDox format'], ['--testdox-group', 'desc' => 'Only include tests from the specified group(s)'], ['--testdox-exclude-group', 'desc' => 'Exclude tests from the specified group(s)'], ['--no-interaction', 'desc' => 'Disable TestDox progress animation'], ['--printer ', 'desc' => 'TestListener implementation to use'], [''], ['--order-by=', 'desc' => 'Run tests in order: default|defects|duration|no-depends|random|reverse|size'], ['--random-order-seed=', 'desc' => 'Use a specific random seed for random order'], ['--cache-result', 'desc' => 'Write test results to cache file'], ['--do-not-cache-result', 'desc' => 'Do not write test results to cache file']], 'Configuration Options' => [['--prepend ', 'desc' => 'A PHP script that is included as early as possible'], ['--bootstrap ', 'desc' => 'A PHP script that is included before the tests run'], ['-c|--configuration ', 'desc' => 'Read configuration from XML file'], ['--no-configuration', 'desc' => 'Ignore default configuration file (phpunit.xml)'], ['--no-logging', 'desc' => 'Ignore logging configuration'], ['--no-extensions', 'desc' => 'Do not load PHPUnit extensions'], ['--include-path ', 'desc' => 'Prepend PHP's include_path with given path(s)'], ['-d ', 'desc' => 'Sets a php.ini value'], ['--generate-configuration', 'desc' => 'Generate configuration file with suggested settings'], ['--cache-result-file=', 'desc' => 'Specify result cache path and filename']], 'Miscellaneous Options' => [['-h|--help', 'desc' => 'Prints this usage information'], ['--version', 'desc' => 'Prints the version and exits'], ['--atleast-version ', 'desc' => 'Checks that version is greater than min and exits'], ['--check-version', 'desc' => 'Check whether PHPUnit is the latest version']]]
private PHPUnit\TextUI\Help::LEFT_MARGIN = ' '
Properties
private $hasColor
 


  • var bool Use color highlights for sections, options and parameters
private $maxArgLength
 


  • var int Number of columns required to write the longest option name to the console
private $maxDescLength
 


  • var int Number of columns left for the description field after padding and option
Methods
private writePlaintext() : void
private writeWithColor() : void
© 2020 Bruce Wells
Search Namespaces \ Classes
ConfigurationNumbers (0-9.) only