Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
P

phpunit

> 测试质量
Open source

The PHP Unit Testing framework.

20.0K stars0 likes11 views
WebsiteGitHub

About

The PHP Unit Testing framework.

PHPUnit

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

Installation

We distribute a PHP Archive (PHAR) that has all required dependencies of PHPUnit bundled in a single file:

bash
$ wget https://phar.phpunit.de/phpunit-X.Y.phar

$ php phpunit-X.Y.phar --version

Please replace X.Y with the version of PHPUnit you are interested in.

Alternatively, you may use Composer to download and install PHPUnit as well as its dependencies. Please refer to the documentation for details on how to install PHPUnit.

Contribute

Please refer to CONTRIBUTING.md for information on how to contribute to PHPUnit and its related projects.

A big "Thank you!" to everyone who has contributed to PHPUnit! You can find a detailed list of contributors on every PHPUnit related package on GitHub.

Here is a list of all components that are primarily developed and maintained by Sebastian Bergmann:

  • phpunit/phpunit
  • phpunit/php-code-coverage
  • phpunit/php-file-iterator
  • phpunit/php-invoker
  • phpunit/php-text-template
  • phpunit/php-timer
  • sebastian/cli-parser
  • sebastian/comparator
  • sebastian/complexity
  • sebastian/diff
  • sebastian/environment
  • sebastian/exporter
  • sebastian/file-filter
  • sebastian/git-state
  • sebastian/global-state
  • sebastian/lines-of-code
  • sebastian/object-enumerator
  • sebastian/object-reflector
  • sebastian/recursion-context
  • sebastian/type
  • sebastian/version

A very special thanks to everyone who has contributed to the PHPUnit Manual.

In addition to the components listed above, PHPUnit depends on the components listed below:

  • myclabs/deep-copy
  • nikic/php-parser
  • phar-io/manifest
  • phar-io/version
  • staabm/side-effects-detector
  • theseer/tokenizer

These tools are used to develop PHPUnit:

  • Composer
  • Phive
  • PHP Autoload Builder
  • PHP-CS-Fixer
  • PHP-Scoper
  • PHPStan

Sponsors

It has taken Sebastian Bergmann thousands of hours to develop, test, and support PHPUnit. You can sponsor his Open Source work through GitHub Sponsors, for example.

These businesses support Sebastian Bergmann's work on PHPUnit:

Would you like to see your logo here as well as on the PHPUnit website? Contact Sebastian Bergmann at [email protected] to learn more about how you can support his work on PHPUnit.

Whether you are a CEO, CFO, CTO, or a developer: your company surely depends on Open Source software. It is time to pay your share and support maintainers like Sebastian Bergmann.

Issues· 25 open

View all issuesOpen on GitHub
  • #5581

    Dependency Dashboard

    type/dependenciesUpdated Oct 1, 2026
  • #7008

    Native support for property-based testing

    type/enhancementUpdated Sep 27, 2026
  • #7004

    Guarantee that tests, test suites, and hook methods are bracketed by events

    type/backward-compatibilityfeature/eventsUpdated Sep 26, 2026
  • #6998

    Inherit class-level `#[Group]`, `#[Ticket]`, `#[Small]`, `#[Medium]`, and `#[Large]` from parent classes of test classes

    type/enhancementtype/backward-compatibilityfeature/test-runnerfeature/metadata/attributesUpdated Sep 24, 2026
  • #6961

    Reconsider inheriting `#[Group]` from parent test classes

    type/enhancementfeature/test-runnerfeature/metadata/attributesUpdated Sep 9, 2026
  • #6585

    Redesign the test reordering subsystem

    type/enhancementfeature/test-runnerUpdated Sep 4, 2026
  • #6897

    Test Impact Analysis

    type/enhancementfeature/test-runnerfeature/code-coverageUpdated Aug 23, 2026
  • #6686

    Replace `LogicalNot::negate()` with dedicated negation methods on `Constraint`

    type/enhancementtype/refactoringtype/backward-compatibilityfeature/assertionUpdated Jul 11, 2026
  • #6491

    Drop support for PHP 8.4

    type/dependenciesUpdated May 28, 2026
  • #6580

    Move/Rename events for issues triggered outside of tests

    type/refactoringtype/backward-compatibilityfeature/eventsUpdated Apr 11, 2026

> Tags

PHPphpphpunittesting-tools

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedOct 1, 2026
Category测试质量
PricingOpen source

> Related tools

J
Jest
JavaScript 测试框架
P
Playwright
现代端到端测试框架
E
eslint-plugin-test-selectors
Enforces that data-test-id attributes are added to interactive DOM elements (JSX) to help with UI testing. JSX only.