PHPUnit
PHPUnit is the de-facto standard for unit testing in PHP projects. It provides both a framework that makes the writing of tests easy as well as the functionality to easily run the tests and analyse their results.
Requirements
- PHPUnit 3.6 requires PHP 5.2.7 (or later) but PHP 5.3.9 (or later) is highly recommended.
- PHP_CodeCoverage, the library that is used by PHPUnit to collect and process code coverage information, depends on Xdebug 2.0.5 (or later) but Xdebug 2.1.3 (or later) is highly recommended.
Installation
git clone --recursive git@github.com:joshthewhite/phpunit.git phpunit
The phpunit/phpunit.php script can be used to invoke the PHPUnit test runner.
Documentation
The documentation for PHPUnit is available in different formats:
- English, multiple HTML files
- English, single HTML file
- English, PDF
- English, ePub
- Japanese, multiple HTML files
- Japanese, single HTML file
- Japanese, PDF
- Japanese, ePub
IRC
The #phpunit channel on the Freenode IRC network is a place to chat about PHPUnit.