phpunit

PHPUnit command-line test runner. More information: <https://phpunit.de>.

Install

All systems
curl cmd.cat/phpunit.sh
Debian Debian
apt-get install phpunit
Ubuntu
apt-get install phpunit
image/svg+xml Kali Linux
apt-get install phpunit
Fedora
dnf install phpunit
Windows (WSL2)
sudo apt-get update sudo apt-get install phpunit
OS X
brew install phpunit
Raspbian
apt-get install phpunit

PHPUnit command-line test runner. More information: <https://phpunit.de>.

  • Run tests in the current directory. Note: Expects you to have a 'phpunit.xml':
    phpunit
  • Run tests in a specific file:
    phpunit path/to/TestFile.php
  • Run tests annotated with the given group:
    phpunit --group name
  • Run tests and generate a coverage report in HTML:
    phpunit --coverage-html path/to/directory

© tl;dr; authors and contributors