Skip to content

Commit 2a67d5d

Browse files
committed
Merge pull request #26 from enygma/readme-update-required-software
Readme update required software
2 parents 2dd8395 + 4f28509 commit 2a67d5d

File tree

2 files changed

+29
-10
lines changed

2 files changed

+29
-10
lines changed

README.md

+27-9
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,35 @@
22

33
# codeclimate-test-reporter
44

5-
Collects test coverage data from your PHP test suite and sends it to
5+
Collects test coverage data from your PHP test suite and sends it to
66
Code Climate's hosted, automated code review service.
77

88
Code Climate - https://codeclimate.com
99

1010
**Important:** If you encounter an error involving SSL certificates, see the **Known Issue: SSL Certificate Error** section below.
1111

12+
## Requirements
13+
14+
There are several requirements you'll need in order to use the PHP test reporter on your system:
15+
16+
- [PHPUnit](http://phpunit.de)
17+
- [Xdebug](http://xdebug.org)
18+
- [Composer](http://getcomposer.org)
19+
20+
The test reporter uses the [PHPUnit](http://phpunit.de) testing tool to generate [code coverage](http://en.wikipedia.org/wiki/Code_coverage) information. These results show how much of your application's code is being executed by your unit tests. PHPUnit can't generate this information on it's own though - it needs another tool, [Xdebug](http://xdebug.org). This is *not* included as a part of the PHPUnit (or PHP) install by default so you'll need to install it yourself.
21+
22+
Xdebug is installed as an extension to PHP, not a library. You can find more information about installing the tool via PECL [on the project website](http://xdebug.org/docs/install).
23+
24+
If you execute your PHPUnit tests with the `--coverage-clover` option and receive the message "The Xdebug extension is not loaded. No code coverage will be generated." you will need to visit the Xdebug website and install the extension. If you do not, you'll most likely get an error something like this:
25+
26+
```
27+
PHP Warning: simplexml_load_file(): I/O warning : failed to load external entity "[...]/build/logs/clover.xml" in [...]/vendor/satooshi/php-coveralls/src/Contrib/Bundle/CoverallsV1Bundle/Api/Jobs.php on line 52
28+
```
29+
1230
## Installation
1331

14-
This package requires a user, but not necessarily a paid account, on
15-
Code Climate, so if you don't have one the first step is to signup at:
32+
This package requires a user, but not necessarily a paid account, on
33+
Code Climate, so if you don't have one the first step is to signup at:
1634
https://codeclimate.com.
1735

1836
To install php-test-reporter with Composer run the following command.
@@ -50,18 +68,18 @@ Or invoke `phpunit` as follows:
5068
$ phpunit --coverage-clover build/logs/clover.xml
5169
```
5270

53-
- Specifying your repo token as an environment variable, invoke the
71+
- Specifying your repo token as an environment variable, invoke the
5472
test-reporter:
5573

5674
```
5775
$ CODECLIMATE_REPO_TOKEN="..." vendor/bin/test-reporter
5876
```
5977

60-
The `CODECLIMATE_REPO_TOKEN` value is provided after you add your repo
61-
to your Code Climate account by clicking on "Setup Test Coverage" on the
78+
The `CODECLIMATE_REPO_TOKEN` value is provided after you add your repo
79+
to your Code Climate account by clicking on "Setup Test Coverage" on the
6280
right hand side of your feed.
6381

64-
Please contact [email protected] if you need any assistance setting
82+
Please contact [email protected] if you need any assistance setting
6583
this up.
6684

6785
## Known Issue: SSL Certificate Error
@@ -83,7 +101,7 @@ More details can be found in [this issue][issue].
83101
84102
## Contributions
85103
86-
Patches, bug fixes, feature requests, and pull requests are welcome on
104+
Patches, bug fixes, feature requests, and pull requests are welcome on
87105
the GitHub page for this project:
88106
89107
https://github.com/codeclimate/php-test-reporter
@@ -94,6 +112,6 @@ This package is maintained by Bryan Helmkamp ([email protected]).
94112
95113
See LICENSE.txt
96114
97-
Portions of the implementation were inspired by the php-coveralls
115+
Portions of the implementation were inspired by the php-coveralls
98116
project.
99117

composer.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919
"symfony/console": ">=2.0"
2020
},
2121
"require-dev": {
22-
"phpunit/phpunit": "3.7.*@stable"
22+
"phpunit/phpunit": "3.7.*@stable",
23+
"ext-xdebug": "*"
2324
},
2425
"autoload": {
2526
"psr-0": {

0 commit comments

Comments
 (0)