Skip to content
testcritic

PHPUnit

The PHP testing standard, integrated into every major PHP framework.

Unit & ComponentOpen sourceSelf-hostable
Visit PHPUnit

What it is

PHPUnit is the xUnit implementation for PHP and the foundation of the testing tooling in Laravel, Symfony and essentially every other PHP framework. It provides test cases, data providers, mocks, and code coverage via Xdebug or PCOV.

Best for

Every PHP project, directly or through a wrapper.

Where it is strong

  • Universal in PHP — every framework builds on it.
  • Mature mocking, data providers and coverage integration.
  • Well documented and extremely stable.

Where it falls short

  • Major versions drop older PHP releases aggressively, forcing upgrade work.
  • Verbose compared to newer wrappers such as Pest.
  • Coverage requires an extension, which slows runs significantly.

Pricing

Free and open source

Open source

Free tier: Everything, self-hosted

What drives the bill: Free and open source. You pay in engineering time and CI minutes.

Check current pricing on Sebastian Bergmann’s site

Figures are indicative and were last reviewed August 2026. Vendors change pricing often; confirm before you commit.

Works with

LaravelSymfonyComposerGitHub ActionsSonarQube

What people who use PHPUnit say

No reviews of PHPUnit yet. If you have used it in anger, yours would be the first.

Alternatives to PHPUnit

If PHPUnit is not the right fit, these solve the same problem differently.

Explore all alternatives