Download the PHP package mcustiel/codeception-http-mock without Composer
On this page you can find all versions of the php package mcustiel/codeception-http-mock. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download mcustiel/codeception-http-mock
More information about mcustiel/codeception-http-mock
Files in mcustiel/codeception-http-mock
Package codeception-http-mock
Short Description Extension for HTTP Mock.
License GPL-3.0+
Informations about the package codeception-http-mock
codeception-http-mock
This Codeception Extension allows developers and testers to use HttpMock to mock external services when running codeception tests.
codeception-http-mock runs an instance of http-mock before your tests run so they can mock external services. After the tests are finished it will close the connection and turn http-mock off.
See also
Note
http-mock is a nice application but it is very simple and lacks a lot of functionality. If you need a more complete application to mock and stub remote services, please give Phiremock a try. Phiremock also has a nice codeception extension.
Installation
Composer:
This project is published in packagist, so you just need to add it as a dependency in your composer.json:
If you want to access directly to this repo, adding this to your composer.json should be enough:
Or just download the release and include it in your path.
Configuration Example
Extension
Module
How to use
Prepare your application
First of all, configure your application so when it is being tested it will replace its external services with http-mock. For instance, if you make some requests to a REST service located under http://your.rest.interface, replace that url in configuration with the host yoy set up in http-mock extension configuration.
Write your tests
All versions of codeception-http-mock with dependencies
codeception/codeception Version ^2.1
internations/http-mock Version ^0.8
mcustiel/php-simple-di Version >=1.2.0