# PHPUnit

> The testing framework for PHP

Source: https://talira.ai/catalog/phpunit-bg1qx6g0
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Framework, Command-line tool
- Categories: [developer tools / testing / frameworks](https://talira.ai/categories/developer-tools/testing/frameworks), [languages / php](https://talira.ai/categories/languages/php)
- Licence: BSD-3-Clause[^2]
- Pricing: Free and open source[^2]
- Pricing notes: Free and open source.
- Free tier: yes[^2]
- Backed by: [Sebastian Bergmann](https://talira.ai/orgs/sebastian-bergmann.md)

PHPUnit is the standard unit testing framework for PHP, made by Sebastian Bergmann. You write tests as classes extending `TestCase` with assertions, and its command-line runner finds and runs them, with data providers for parameterized tests, test dependencies, test doubles and mock objects, attributes for configuration, code coverage reports and JUnit-format logs for CI. It installs per project with Composer (`phpunit/phpunit`) or as a self-contained PHAR, also through Phive. A new major version comes out each February: PHPUnit 13, released in February 2026, needs PHP 8.4 or newer, and older majors keep bugfix support for PHP versions they cover.

## Links

- Website: https://phpunit.de/
- GitHub: https://github.com/sebastianbergmann/phpunit
- Docs: https://docs.phpunit.de/en/13.4/

## Ways to install

### Package managers

- [Homebrew](https://talira.ai/catalog/homebrew-djy17yn9.md): <https://formulae.brew.sh/formula/phpunit>[^1]

## Problems it solves

- write unit tests for my PHP code
- run my PHP test suite in CI and get a coverage report
- mock a dependency in a PHP unit test

## Features

- TestCase classes with assertions
- data providers and test dependencies
- test doubles and mock objects
- attributes to configure tests
- code coverage reports
- JUnit XML logging for CI
- Composer package or self-contained PHAR (also via Phive)
- PHPT tests

## Trust

Overall: 0.73 out of 1.
Signals: maintenance 1.00, adoption 0.86, momentum 0.60, community 1.00, backing 0.30, extensibility 0.00.

- last commit today
- 1651 commits in the last 90 days
- latest release 13.4.8 5 days ago
- 20.1k GitHub stars
- 566 contributors
- accepts sponsorship (Github, Liberapay, Thanks Dev)
- backed by Sebastian Bergmann

## Sources

[^1]: https://formulae.brew.sh/api/formula/phpunit.json (checked 24 Nov 2026)
[^2]: https://github.com/sebastianbergmann/phpunit/blob/main/LICENSE (checked 24 Nov 2026)
