Download the PHP package narekps/codeception-wiremock-module without Composer
On this page you can find all versions of the php package narekps/codeception-wiremock-module. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download narekps/codeception-wiremock-module
More information about narekps/codeception-wiremock-module
Files in narekps/codeception-wiremock-module
Package codeception-wiremock-module
Short Description Wiremock module for Codeception
License GPL-3.0+
Informations about the package codeception-wiremock-module
codeception-wiremock-extension
This Codeception Extension allows developers and testers to use WireMock to mock external services when running codeception tests.
codeception-wiremock-extension connects to an already running instance of WireMock or can also run automatically a local standalone one. And, it is able to download the version of wiremock you preffer and run it too. After the tests are finished it will close the connection and turn wiremock service off (when it started it).
See also
Note
If you need an application with a functionality that is similar to the one offered by WireMock and is 100% PHP, please give Phiremock a try: Phiremock, it 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:
Configuration Examples
Module
The module allow you to connect to a WireMock instance, it can be the one ran by the extension or an already running one.
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 WireMock. For instance, if you make some requests to a REST service located under http://your.rest.interface, replace that url in configuration with the url where WireMock runs, for instance: http://localhost:8080/rest_interface.
Write your tests
All versions of codeception-wiremock-module with dependencies
codeception/codeception Version ^5.0.0
wiremock-php/wiremock-php Version ^2.35