Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/mcustiel/phiremock
Browse files Browse the repository at this point in the history
  • Loading branch information
mcustiel committed Mar 3, 2016
2 parents 29cd13f + 7ad5e05 commit a580762
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# phiremock (beta)
# Phiremock (beta)

Phiremock is a HTTP services mocker and stubber, it allows software developers to setup static responses for expected requests to avoid connecting to real services during development. Also can be used to avoid using real services and to expect always the same response during acceptance tests. Any HTTP service (i.e.: REST services) can be mocked and stubbed.

Expand Down Expand Up @@ -29,6 +29,7 @@ Run your phiremock service using it's cli command:
**Cli arguments:**
* -i argument specifies in which interface Phiremock should listen for requests. Default is 0.0.0.0
* -p argument is the port in which Phiremock should listen. Default is 8086
* -d argument enables debug mode in logger. By default, info logging level is used.

Then, using phiremock's REST interface, expectations can be configured, specifying the response to send for a given request. A REST expectation resource for phiremock looks like this:

Expand Down Expand Up @@ -111,6 +112,15 @@ To know how much times a request was sent to Phiremock, for instance to verify a
$this->assertEquals($expectedExecutions, $actualExecutions);
```

To reset the requests counter to 0, Phiremock also provides a method:

```php
use Mcustiel\Phiremock\Client\Phiremock;

$phiremock = new Phiremock('phiremock.server', '8080');
$phiremock->resetRequestsCounter();
```

Phiremock is heavily inspired by [wiremock](http://wiremock.org/), but does not force you to have a java installation in your PHP development environment. The full functionality of Phiremock is detailed in the following list:

* Allows to mock http request based in method, headers, url and body content.
Expand Down

0 comments on commit a580762

Please sign in to comment.