Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 74 lines (47 sloc) 3.94 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
7 * PHPUnit 3.7 requires PHP 5.3.3 (or later) but PHP 5.4.6 (or later) is highly recommended.
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.0.5 (or later) but Xdebug 2.2.1 (or later) is highly recommended.
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 You can also download a PHP Archive (PHAR) of PHPUnit that has all required (as well as some optional) dependencies of PHPUnit bundled in a single file:
36
37 wget http://pear.phpunit.de/get/phpunit.phar
38 chmod +x phpunit.phar
f634bc1 @sebastianbergmann Extract information on how to contribute into separate document.
authored
39
d4a08a2 @sebastianbergmann Update installation instructions.
authored
40 ## Documentation
f634bc1 @sebastianbergmann Extract information on how to contribute into separate document.
authored
41
42 The documentation for PHPUnit is available in different formats:
43
44 * [English, multiple HTML files](http://www.phpunit.de/manual/3.7/en/index.html)
45 * [English, single HTML file](http://www.phpunit.de/manual/3.7/en/phpunit-book.html)
46 * [English, PDF](http://www.phpunit.de/manual/3.7/en/phpunit-book.pdf)
47 * [English, ePub](http://www.phpunit.de/manual/3.7/en/phpunit-book.epub)
48 * [French, multiple HTML files](http://www.phpunit.de/manual/3.7/fr/index.html)
49 * [French, single HTML file](http://www.phpunit.de/manual/3.7/fr/phpunit-book.html)
50 * [French, PDF](http://www.phpunit.de/manual/3.7/fr/phpunit-book.pdf)
51 * [French, ePub](http://www.phpunit.de/manual/3.7/fr/phpunit-book.epub)
52 * [Japanese, multiple HTML files](http://www.phpunit.de/manual/3.7/ja/index.html)
53 * [Japanese, single HTML file](http://www.phpunit.de/manual/3.7/ja/phpunit-book.html)
54 * [Japanese, PDF](http://www.phpunit.de/manual/3.7/ja/phpunit-book.pdf)
55 * [Japanese, ePub](http://www.phpunit.de/manual/3.7/ja/phpunit-book.epub)
56
d4a08a2 @sebastianbergmann Update installation instructions.
authored
57 ## IRC
f634bc1 @sebastianbergmann Extract information on how to contribute into separate document.
authored
58
38ed95b @edorian Fixed irc channel
edorian authored
59 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
60
d4a08a2 @sebastianbergmann Update installation instructions.
authored
61 ## List of Contributors
f634bc1 @sebastianbergmann Extract information on how to contribute into separate document.
authored
62
63 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:
64
d4a08a2 @sebastianbergmann Update installation instructions.
authored
65 * [PHPUnit](https://github.com/sebastianbergmann/phpunit/graphs/contributors)
66 * [PHP_CodeCoverage](https://github.com/sebastianbergmann/php-code-coverage/graphs/contributors)
67 * [PHPUnit_MockObject](https://github.com/sebastianbergmann/phpunit-mock-objects/graphs/contributors)
f634bc1 @sebastianbergmann Extract information on how to contribute into separate document.
authored
68
69 A very special thanks to everyone who has contributed to the documentation and helps maintaining the translations:
70
d4a08a2 @sebastianbergmann Update installation instructions.
authored
71 * [PHPUnit Documentation](https://github.com/sebastianbergmann/phpunit-documentation/graphs/contributors)
f634bc1 @sebastianbergmann Extract information on how to contribute into separate document.
authored
72
87d0e1a @sebastianbergmann Fix link.
authored
73 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.