Forrest logo
tool overview
On this page you find all important commands for the CLI tool phpunit. If the command you are looking for is missing please ask our AI.

phpunit

PHPUnit is a programmer-oriented testing framework for PHP. It is an instance of the xUnit architecture for unit testing frameworks.

List of commands for phpunit:

  • phpunit:run:file Run tests in a specific file.
    $ phpunit ${path-to-TestFile-php}
    try on your machine
    explain this command
  • phpunit:tests:run Run tests in the current directory. Note: Expects you to have a 'phpunit.xml'.
    $ phpunit
    try on your machine
    explain this command
  • phpunit:tests:run-with-coverage Run tests and generate a coverage report in HTML.
    $ phpunit --coverage-html ${path/to/directory}
    try on your machine
    explain this command
  • phpunit:tldr:c3dd7 phpunit: Run tests annotated with the given group.
    $ phpunit --group ${name}
    try on your machine
    explain this command
tool overview