Skip to content
This repository has been archived by the owner on Mar 22, 2018. It is now read-only.

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
toopay committed Jul 27, 2013
1 parent 183abed commit 580b844
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions README.md
Expand Up @@ -35,18 +35,18 @@ The main goal of the PHPunit Coverage Listener package is to provide a mechanism

Then in the target server, you could accept the payload as follow (simplified) :

<?php
<?php

$success = false;
$success = false;

if (!empty($_FILES) && isset($_FILES['json_file'])) {
$target = __DIR__.'/coverage.json';
move_uploaded_file($_FILES['json_file']['tmp_name'], $target);
$success = 'Saved into http://'.$_SERVER['HTTP_HOST'].'/coverage.json';
}
if (!empty($_FILES) && isset($_FILES['json_file'])) {
$target = __DIR__.'/coverage.json';
move_uploaded_file($_FILES['json_file']['tmp_name'], $target);
$success = 'Saved into http://'.$_SERVER['HTTP_HOST'].'/coverage.json';
}

header('Content-Type: application/json');
die(json_encode(compact('success')));
header('Content-Type: application/json');
die(json_encode(compact('success')));

Above json data could be process furthermore to expose usefull information about your code-coverage information in a way that fit with your specific needs. [Coveralls](https://coveralls.io/) service would be a perfect example in this scenario.

Expand Down

0 comments on commit 580b844

Please sign in to comment.