Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
The PHP Unit Testing framework.
PHP

This branch is 6 commits ahead, 119 commits behind sebastianbergmann:3.5

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
PHPUnit
Tests
.gitignore
ChangeLog.markdown
README.markdown
assertions.php
build.xml
make_phar.php
package.xml
phpunit.bat
phpunit.php
phpunit.xml.dist

README.markdown

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.

Installation

PHPUnit should be installed using the PEAR Installer. This installer is the backbone of PEAR, which provides a distribution system for PHP packages, and is shipped with every release of PHP since version 4.3.0.

The PEAR channel (pear.phpunit.de) that is used to distribute PHPUnit needs to be registered with the local PEAR environment. Furthermore, components that PHPUnit depends upon are hosted on additional PEAR channels.

pear channel-discover pear.phpunit.de
pear channel-discover components.ez.no
pear channel-discover pear.symfony-project.com

This has to be done only once. Now the PEAR Installer can be used to install packages from the PHPUnit channel:

pear install phpunit/PHPUnit

After the installation you can find the PHPUnit source files inside your local PEAR directory; the path is usually /usr/lib/php/PHPUnit.

Documentation

The documentation for PHPUnit is available in different formats:

Something went wrong with that request. Please try again.