Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 56 lines (36 sloc) 3.312 kB
f634bc1 @sebastianbergmann Extract information on how to contribute into separate document.
authored
1 Contributing to PHPUnit
2 =======================
3
4 Contributions to PHPUnit, its related modules, and its documentation are always welcome. You make our lifes easier by sending us your contributions through GitHub pull requests.
5
6 Please note that the `3.6.` branch is closed for features and that pull requests should to be based on `master` or the `3.7.` once it exists.
7
8 We are trying to keep backwards compatibility breaks in PHPUnit 3.7 to an absolute minimum so please take this into account when proposing changes.
9
10 Due to time constraints, we are not always able to respond as quickly as we would like. Please do not take delays personal and feel free to remind us here or on IRC if you feel that we forgot to respond.
11
12 Using PHPUnit From a Git Checkout
13 ---------------------------------
14
15 The following commands can be used to perform the initial checkout of PHPUnit and its dependencies from Git:
16
17 mkdir phpunit && cd phpunit
18 git clone git://github.com/sebastianbergmann/phpunit.git
19 git clone git://github.com/sebastianbergmann/dbunit.git
20 git clone git://github.com/sebastianbergmann/php-file-iterator.git
21 git clone git://github.com/sebastianbergmann/php-text-template.git
22 git clone git://github.com/sebastianbergmann/php-code-coverage.git
23 git clone git://github.com/sebastianbergmann/php-token-stream.git
24 git clone git://github.com/sebastianbergmann/php-timer.git
25 git clone git://github.com/sebastianbergmann/phpunit-mock-objects.git
26 git clone git://github.com/sebastianbergmann/phpunit-selenium.git
27 git clone git://github.com/sebastianbergmann/phpunit-story.git
28 git clone git://github.com/sebastianbergmann/php-invoker.git
29
30 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`.
31
32 In addition to the checkouts listed above, the YAML component that is provided by the Symfony project is required:
33
34 pear install pear.symfony.com/Yaml
35
36 The `phpunit/phpunit.php` script can be used to invoke the PHPUnit test runner.
37
38 Running the test suite(s)
39 -------------------------
40
41 It is not possible to use a system-wide installed version of PHPUnit to run the test suite of a Git checkout. Because of that is is necessary to change the `include_paths` as described below.
42
43 This can be achieved with a small wrapper script designed to work with every module in the PHPUnit stack.
44
45 Note that you might have to change the path to your PEAR installation here pointing to `/usr/local/lib/php`. You can find it using `pear config-show | grep php_dir`.
46
47 ### Linux / MacOS X
48
49 #!/bin/bash
50 php -d include_path='.:../phpunit/:../dbunit/:../php-code-coverage/:../php-file-iterator/:../php-invoker/:../php-text-template/:../php-timer:../php-token-stream:../phpunit-mock-objects/:../phpunit-selenium/:../phpunit-story/:/usr/local/lib/php' ../phpunit/phpunit.php $*
51
52 ### Windows
53
54 @echo off
55 php -d include_path='.;../phpunit/;../dbunit/;../php-code-coverage/;../php-file-iterator/;../php-invoker/;../php-text-template/;../php-timer;../php-token-stream;../phpunit-mock-objects/;../phpunit-selenium/;../phpunit-story/;C:/Program Files/PHP/pear' ../phpunit/phpunit.php %*
Something went wrong with that request. Please try again.