Skip to content
Newer
Older
100644 74 lines (52 sloc) 3.98 KB
e08e7fd @sebastianbergmann Move changes to ChangeLog.markdown and some basic information to READ…
authored
1 PHPUnit
2 =======
8094aa8 @sebastianbergmann Add changelog.
authored
3
e08e7fd @sebastianbergmann Move changes to ChangeLog.markdown and some basic information to READ…
authored
4 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.
8094aa8 @sebastianbergmann Add changelog.
authored
5
3adee4b @sebastianbergmann Add "Requirements" section.
authored
6 Requirements
e08e7fd @sebastianbergmann Move changes to ChangeLog.markdown and some basic information to READ…
authored
7 ------------
8
4a5c908 @sebastianbergmann Merge branch '3.5'
authored
9 * PHPUnit 3.6 requires PHP 5.2.7 (or later) but PHP 5.3.8 (or later) is highly recommended.
10 * [PHP_CodeCoverage](http://github.com/sebastianbergmann/php-code-coverage), the library that is used by PHPUnit 3.6 to collect and process code coverage information, depends on [Xdebug](http://xdebug.org/) 2.0.5 (or later) but Xdebug 2.1.2 (or later) is highly recommended.
3adee4b @sebastianbergmann Add "Requirements" section.
authored
11
fa8020f @sebastianbergmann Move changes to ChangeLog.markdown and some basic information to READ…
authored
12 Installation
13 ------------
e08e7fd @sebastianbergmann Move changes to ChangeLog.markdown and some basic information to READ…
authored
14
34f9ee9 @sebastianbergmann Refactor installation instructions.
authored
15 PHPUnit should be installed using the PEAR Installer, the backbone of the [PHP Extension and Application Repository](http://pear.php.net/) that provides a distribution system for PHP packages.
e08e7fd @sebastianbergmann Move changes to ChangeLog.markdown and some basic information to READ…
authored
16
a2d7708 @sebastianbergmann Fix wording.
authored
17 Depending on your OS distribution and/or your PHP environment, you may need to install PEAR or update your existing PEAR installation before you can proceed with the following instructions. `sudo pear upgrade PEAR` usually suffices to upgrade an existing PEAR installation. The [PEAR Manual ](http://pear.php.net/manual/en/installation.getting.php) explains how to perform a fresh installation of PEAR.
e08e7fd @sebastianbergmann Move changes to ChangeLog.markdown and some basic information to READ…
authored
18
9a9e931 @sebastianbergmann Add note that PEAR commands may need to be run as root.
authored
19 The following two commands (which you may have to run as `root`) are all that is required to install PHPUnit using the PEAR Installer:
e08e7fd @sebastianbergmann Move changes to ChangeLog.markdown and some basic information to READ…
authored
20
34f9ee9 @sebastianbergmann Refactor installation instructions.
authored
21 pear config-set auto_discover 1
22 pear install pear.phpunit.de/PHPUnit
e08e7fd @sebastianbergmann Move changes to ChangeLog.markdown and some basic information to READ…
authored
23
24 After the installation you can find the PHPUnit source files inside your local PEAR directory; the path is usually `/usr/lib/php/PHPUnit`.
25
26 Documentation
8094aa8 @sebastianbergmann Add changelog.
authored
27 -------------
28
e08e7fd @sebastianbergmann Move changes to ChangeLog.markdown and some basic information to READ…
authored
29 The documentation for PHPUnit is available in different formats:
30
31 * [English, multiple HTML files](http://www.phpunit.de/manual/3.6/en/index.html)
32 * [English, single HTML file](http://www.phpunit.de/manual/3.6/en/phpunit-book.html)
33 * [English, PDF](http://www.phpunit.de/manual/3.6/en/phpunit-book.pdf)
34 * [English, ePub](http://www.phpunit.de/manual/3.6/en/phpunit-book.epub)
35 * [Japanese, multiple HTML files](http://www.phpunit.de/manual/3.6/ja/index.html)
36 * [Japanese, single HTML file](http://www.phpunit.de/manual/3.6/ja/phpunit-book.html)
37 * [Japanese, PDF](http://www.phpunit.de/manual/3.6/ja/phpunit-book.pdf)
38 * [Japanese, ePub](http://www.phpunit.de/manual/3.6/ja/phpunit-book.epub)
7c97a91 @sebastianbergmann Initial draft for documentation on how to use PHPUnit from a Git chec…
authored
39
3744fa0 @sebastianbergmann Add information about mailing lists and IRC.
authored
40 IRC
41 ---
42
43 The [#phpunit channel on the Freenode IRC network](irc://freenode.net/phpunit) is a place to chat about PHPUnit.
44
7c97a91 @sebastianbergmann Initial draft for documentation on how to use PHPUnit from a Git chec…
authored
45 Using PHPUnit From a Git Checkout
46 ---------------------------------
47
48 The following commands can be used to perform the initial checkout of PHPUnit and its dependencies from Git:
49
50 mkdir phpunit && cd phpunit
51 git clone git://github.com/sebastianbergmann/phpunit.git
52 git clone git://github.com/sebastianbergmann/dbunit.git
53 git clone git://github.com/sebastianbergmann/php-file-iterator.git
54 git clone git://github.com/sebastianbergmann/php-text-template.git
55 git clone git://github.com/sebastianbergmann/php-code-coverage.git
56 git clone git://github.com/sebastianbergmann/php-token-stream.git
57 git clone git://github.com/sebastianbergmann/php-timer.git
58 git clone git://github.com/sebastianbergmann/phpunit-mock-objects.git
59 git clone git://github.com/sebastianbergmann/phpunit-selenium.git
c096bab @sebastianbergmann Mention PHPUnit_Story.
authored
60 git clone git://github.com/sebastianbergmann/phpunit-story.git
ea57bee @elblinkin php-invoker is needed to run PHPUnit master.
elblinkin authored
61 git clone git://github.com/sebastianbergmann/php-invoker.git
7c97a91 @sebastianbergmann Initial draft for documentation on how to use PHPUnit from a Git chec…
authored
62
ea57bee @elblinkin php-invoker is needed to run PHPUnit master.
elblinkin authored
63 The `dbunit`, `php-code-coverage`, `php-file-iterator`, `php-text-template`, `php-timer`, `php-token-stream`, `phpunit`, `phpunit-mock-objects`, `phpunit-selenium`, `phpunit-story`, and `php-invoker` directories need to be added to the `include_path`.
7c97a91 @sebastianbergmann Initial draft for documentation on how to use PHPUnit from a Git chec…
authored
64
5b9542b @sebastianbergmann Fix markup.
authored
65 The `phpunit/phpunit.php` script can be used to invoke the PHPUnit test runner.
09395a8 @sebastianbergmann Update instructions.
authored
66
67 The following commands can be used to check out the appropriate branches for PHPUnit 3.6:
68
69 cd phpunit && git checkout 3.6 && cd ..
70 cd dbunit && git checkout 1.1 && cd ..
71 cd php-code-coverage && git checkout 1.1 && cd ..
72 cd phpunit-mock-objects && git checkout 1.1 && cd ..
73 cd phpunit-selenium && git checkout 1.1 && cd ..
Something went wrong with that request. Please try again.