• Stars
    star
    149
  • Rank 247,814 (Top 5 %)
  • Language
    PHP
  • License
    GNU General Publi...
  • Created almost 9 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

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

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

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.

More Repositories

1

phiremock-codeception-extension

Extension to mock http request to external services during acceptance testing with Codeception. Loads one or more phiremock-servers.
PHP
29
star
2

phiremock-server

Phiremock Server allows to define responses for http requests on the fly through a REST API. Useful to mock external http services during development and acceptance testing.
PHP
18
star
3

php-simple-request

php-simple-request is a request parser library designed to simplify requests validation and filtering using annotations, generating at the same time an object representation from the request data.
PHP
15
star
4

phiremock-client

Phiremock client provides a Facade with a collection of methods to interact with phiremock server's REST api.
PHP
14
star
5

codeception-http-mock

HttpMock extension and module for Codeception.
PHP
13
star
6

php-simple-di

Php Simple DependencyInjection is a library that provides a minimalistic dependency container with the ability to provide singleton or prototype versions of the dependencies identifying them by a name.
PHP
12
star
7

PlayingCodility

Just playing a little with codility and java
Java
10
star
8

codeception-wiremock-extension

An extension that allows to use wiremock when running codeception tests.
PHP
9
star
9

php-simple-cache

php-simple-cache is a PHP Cache library with the minimum functionalities needed that abstracts different cache mechanisms. It is thought to be performant, flexible and easy to use without the need of a containing framework.
PHP
8
star
10

PowerRoute

A route system for php based in different sources of data from the request that uses a binary tree configuration to decide the action to run.
PHP
6
star
11

TypedPhp

Object wrappers for primitive types and typed arrays in PHP.
PHP
6
star
12

phiremock-codeception-module

Module to mock http request to external services during acceptance testing with Codeception. Allows you to connect to one or more Phiremock Servers and to interact with them in a semantic way.
PHP
6
star
13

php-simple-regex

This library allows developers to execute preg_* functions in PHP and use the results as objects, making the use of preg_* functions testeable. PhpSimpleRegex is integrated with PhpVerbalExpressions and Flux, to allow a full Object Oriented Regular Expressions use.
PHP
6
star
14

microfrontends-poc

Proof of concept: microfrontends in php with templado and guzzle
PHP
4
star
15

docker-php-tools

Docker image containing common tools used in php development
Dockerfile
4
star
16

mockable-datetime

Mock DateTime in PHP unit tests
PHP
4
star
17

php-simple-config

php-simple-config is a simple and extensible component that allows the developer to abstract the application configuration management.
PHP
4
star
18

Creature

A library to simplify different ways of getting object instances
PHP
3
star
19

phiremock-docker

Simple docker image for phiremock
Dockerfile
3
star
20

phiremock-common

Common classes for Phiremock
PHP
3
star
21

phing-static-code-analysis-for-composer-projects

This is a Phing build file that I generally use to run static code analysis tools and phpunit in my composer projects.
3
star
22

104

Stupid Simple PHP CommandBus and QueryBus Helper
PHP
2
star
23

go-graph

Implements a general graph data structure in Go
Go
2
star
24

php-simple-captcha

A minimalist library that generates random captcha images using GD2
PHP
2
star
25

go-queue

Implements a damn simple queue data structure in GO lang
Go
2
star
26

oc-pages-compactor

OctoberCMS plugin that provides HTML code minification and embedding of assets to pages.
PHP
2
star
27

php-simple-conversion

php-simple-conversion is a minimalistic conversion service for PHP. It's meant to be performant and easy to use.
PHP
2
star
28

test-seminar-lemundo

This is a dummy project for the automated testing seminar at Lemundo
JavaScript
1
star
29

gorro

Stupid simple go http requests router for my demo projects
Go
1
star
30

php-enum

Fork of myclabs/php-enum that changes the logic of __toString method so it hides by default the value of the enum.
PHP
1
star
31

docker-configs

Some configs I am using for docker
Shell
1
star
32

phiremock-codeception

Bundle for phiremock-codeception-extension and phiremock-codeception-module
1
star
33

learn-go-3

Learning how to program Go, how to make a game and how to use SDL library
Go
1
star
34

oc-compactor-plugin

Compacts HTML content
PHP
1
star
35

nodejs-streams

An example to use node.js streams with transforms and caching
TypeScript
1
star