Giter Site home page Giter Site logo

oleg-andreyev / phiremock Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mcustiel/phiremock

0.0 1.0 0.0 5.57 MB

Phiremock mocks HTTP requests and REST services, allowing to mock external services during acceptance testing.

License: GNU General Public License v3.0

PHP 100.00%

phiremock's Introduction

Phiremock Bundle

Phiremock is a mocker and stubber of HTTP services, it allows software developers to mock HTTP requests and setup responses to avoid calling real services during development, and is particulary useful during acceptance testing when expected http requests can be mocked and verified. Any HTTP service (i.e.: REST services) can be mocked and stubbed with Phiremock. Phiremock is heavily inspired by WireMock, 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.
  • Allows to match expectations using regexp patterns or equality.
  • REST interface to setup.
  • Stateful and stateless mocking.
  • Network latency simulation.
  • Priorizable expectations for cases in which more than one matches the request. If more than one expectation matches the request and no priorities were set, the first match is returned.
  • Allows to verify the amount of times a request was done.
  • Allows to load default expectations from json files in a directory tree.
  • Proxy requests to another URL as they are received.
  • Client with fluent interface to configure Phiremock.
  • Integration to codeception through phiremock-codeception-extension and phiremock-codeception-module.
  • Fill the response body using data from the request.

Latest Stable Version Monthly Downloads

SensioLabsInsight

Note: In version 2 Phiremock has separated libraries for the server and the client. This repository became the bundle for both libraries.

Installation

Composer:

This project is published in packagist, so you just need to add it as a dependency in your composer.json:

    "require-dev": {
        "mcustiel/phiremock": "v2.0",
        "guzzlehttp/guzzle": "^6.0"
    }

See

Thanks to:

And everyone who submitted their Pull Requests.

phiremock's People

Contributors

mcustiel avatar drudoi avatar mrincompetent avatar linslin avatar gounlaf avatar arnaudlabenne avatar alexstansfield avatar danielnoga avatar buflix avatar kaelenproctor avatar nuzzio avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.