Download the PHP package kagency/http-replay without Composer

On this page you can find all versions of the php package kagency/http-replay. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package http-replay

HTTP Replay Test Helper

Travis Build Status

This is a libaray to replay requests and responses in tests. It allows to filter the responses to remove values, one does not want to assert on.

Supported Tools

Supported recordings (Reader):

Supported frameworks (MessageHandler):

Workflow

The workflow for using this test helper could be:

First record some HTTP interaction using MitmDump, executing something like this:

mitmdump -P http://my-website:80/ -p 8080 --anticache -z -w recordFile.tns

The stored file can then be replayed against your application – in my case a Symfony2 stack – by implementing an integration test like this:

This example only implements a very basic set of response filters. You can implement conditional response filters, which only act for certain request URLs and filter, for example, certain JSON properties out of the response.

This example assumes $app is some Symfony2 app, where the method runRequest() recieves a Request object and returns a Response object.

Response Filters

A list of currently implemented response filters

Dispatcher

Takes an array of response filters to apply to the responses. You usually want to use this one to be able to easily apply a set of filters.

Json

Tries to parse JSON to make it easier to compare in tests. Also makes other response filters possible, like the JsonFilter filter.

Takes no arguments.

JsonFilter

Filters out a defined set of properties from a JSON response. Especially sensible, if your JSON response contains fields like dates or revisions.

Receives a list of properties to remove as a constructor argument.

Headers

Implements a blacklist for HTTP headers. Removes those headers from the response. This is especially useful to remove Date and Etag headers, for example.

Receives a list of headers to remove as a constructor argument.

MultipartMixed

Replaces the random boundary string in multipart/mixed responses, to make it possible to comapre them.

Takes no arguments.

ConditionalPathRegexp

Takes to arguments:

Only applies the aggregate filter, if the regular expression matches the requested path.

Verify the Build

You can verify the build by running ant:

ant

This installs all required tools using composer and then runs the tests and static source code verification. You might also run all the tools manually, like:

vendor/bin/phpunit

All versions of http-replay with dependencies

PHP Build Version
Package Version
Requires symfony/http-kernel Version @stable
phuedx/tnetstring Version @dev
kore/data-object Version @stable
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package kagency/http-replay contains the following files

Loading the files please wait ....