Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 72 lines (46 sloc) 3.737 kb
d4a08a2 @sebastianbergmann Update installation instructions.
authored
1 # PHPUnit
f634bc1 @sebastianbergmann Extract information on how to contribute into separate document.
authored
2
3 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.
4
d4a08a2 @sebastianbergmann Update installation instructions.
authored
5 ## Requirements
f634bc1 @sebastianbergmann Extract information on how to contribute into separate document.
authored
6
3856371 @sebastianbergmann Open up master branch for new development.
authored
7 * PHPUnit 3.8 requires PHP 5.4.7 (or later).
8 * [PHP_CodeCoverage](http://github.com/sebastianbergmann/php-code-coverage), the library that is used by PHPUnit to collect and process code coverage information, depends on [Xdebug](http://xdebug.org/) 2.2.1 (or later).
f634bc1 @sebastianbergmann Extract information on how to contribute into separate document.
authored
9
d4a08a2 @sebastianbergmann Update installation instructions.
authored
10 ## Installation
f634bc1 @sebastianbergmann Extract information on how to contribute into separate document.
authored
11
d4a08a2 @sebastianbergmann Update installation instructions.
authored
12 There a three supported ways of installing PHPUnit.
f634bc1 @sebastianbergmann Extract information on how to contribute into separate document.
authored
13
d4a08a2 @sebastianbergmann Update installation instructions.
authored
14 You can use the [PEAR Installer](http://pear.php.net/manual/en/guide.users.commandline.cli.php) or [Composer](http://getcomposer.org/) to download and install PHPUnit as well as its dependencies. You can also download a [PHP Archive (PHAR)](http://php.net/phar) of PHPUnit that has all required (as well as some optional) dependencies of PHPUnit bundled in a single file.
15
16 ### PEAR Installer
f634bc1 @sebastianbergmann Extract information on how to contribute into separate document.
authored
17
18 The following two commands (which you may have to run as `root`) are all that is required to install PHPUnit using the PEAR Installer:
19
20 pear config-set auto_discover 1
21 pear install pear.phpunit.de/PHPUnit
22
d4a08a2 @sebastianbergmann Update installation instructions.
authored
23 ### Composer
24
25 To add PHPUnit as a local, per-project dependency to your project, simply add a dependency on `phpunit/phpunit` to your project's `composer.json` file. Here is a minimal example of a `composer.json` file that just defines a development-time dependency on PHPUnit 3.7:
26
27 {
28 "require-dev": {
29 "phpunit/phpunit": "3.7.*"
30 }
31 }
32
33 ### PHP Archive (PHAR)
34
35 wget http://pear.phpunit.de/get/phpunit.phar
36 chmod +x phpunit.phar
f634bc1 @sebastianbergmann Extract information on how to contribute into separate document.
authored
37
d4a08a2 @sebastianbergmann Update installation instructions.
authored
38 ## Documentation
f634bc1 @sebastianbergmann Extract information on how to contribute into separate document.
authored
39
40 The documentation for PHPUnit is available in different formats:
41
ea1defd @sebastianbergmann Link to current documentation.
authored
42 * [English, multiple HTML files](http://www.phpunit.de/manual/current/en/index.html)
43 * [English, single HTML file](http://www.phpunit.de/manual/current/en/phpunit-book.html)
44 * [English, PDF](http://www.phpunit.de/manual/current/en/phpunit-book.pdf)
45 * [English, ePub](http://www.phpunit.de/manual/current/en/phpunit-book.epub)
46 * [French, multiple HTML files](http://www.phpunit.de/manual/current/fr/index.html)
47 * [French, single HTML file](http://www.phpunit.de/manual/current/fr/phpunit-book.html)
48 * [French, PDF](http://www.phpunit.de/manual/current/fr/phpunit-book.pdf)
49 * [French, ePub](http://www.phpunit.de/manual/current/fr/phpunit-book.epub)
50 * [Japanese, multiple HTML files](http://www.phpunit.de/manual/current/ja/index.html)
51 * [Japanese, single HTML file](http://www.phpunit.de/manual/current/ja/phpunit-book.html)
52 * [Japanese, PDF](http://www.phpunit.de/manual/current/ja/phpunit-book.pdf)
53 * [Japanese, ePub](http://www.phpunit.de/manual/current/ja/phpunit-book.epub)
f634bc1 @sebastianbergmann Extract information on how to contribute into separate document.
authored
54
d4a08a2 @sebastianbergmann Update installation instructions.
authored
55 ## IRC
f634bc1 @sebastianbergmann Extract information on how to contribute into separate document.
authored
56
38ed95b @edorian Fixed irc channel
edorian authored
57 The [#phpunit channel on the Freenode IRC network](irc://irc.freenode.net/phpunit) is a place to chat about PHPUnit.
f634bc1 @sebastianbergmann Extract information on how to contribute into separate document.
authored
58
d4a08a2 @sebastianbergmann Update installation instructions.
authored
59 ## List of Contributors
f634bc1 @sebastianbergmann Extract information on how to contribute into separate document.
authored
60
61 Thanks to everyone who has contributed to PHPUnit! You can find a detailed list of contributors on every PHPUnit related package on GitHub. This list shows only the major components:
62
d4a08a2 @sebastianbergmann Update installation instructions.
authored
63 * [PHPUnit](https://github.com/sebastianbergmann/phpunit/graphs/contributors)
64 * [PHP_CodeCoverage](https://github.com/sebastianbergmann/php-code-coverage/graphs/contributors)
65 * [PHPUnit_MockObject](https://github.com/sebastianbergmann/phpunit-mock-objects/graphs/contributors)
f634bc1 @sebastianbergmann Extract information on how to contribute into separate document.
authored
66
67 A very special thanks to everyone who has contributed to the documentation and helps maintaining the translations:
68
d4a08a2 @sebastianbergmann Update installation instructions.
authored
69 * [PHPUnit Documentation](https://github.com/sebastianbergmann/phpunit-documentation/graphs/contributors)
f634bc1 @sebastianbergmann Extract information on how to contribute into separate document.
authored
70
87d0e1a @sebastianbergmann Fix link.
authored
71 Please refer to [CONTRIBUTING.md](https://github.com/sebastianbergmann/phpunit/blob/master/CONTRIBUTING.md) for information on how to contribute to PHPUnit and its related projects.
Something went wrong with that request. Please try again.