• Stars
    star
    68
  • Rank 457,643 (Top 10 %)
  • Language
    PHP
  • License
    MIT License
  • Created over 9 years ago
  • Updated over 1 year ago

Reviews

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

Repository Details

Mock HTTP client

Mock Client

Latest Version Software License Build Status Total Downloads

Mock HTTP client

Install

Via Composer

composer require --dev php-http/mock-client

Usage

This client does not actually send requests to any server.

Instead it stores the request and returns a pre-set response or throws an exception. This client is useful for unit testing code that depends on a HTTPlug client to send requests and receive responses.

Documentation

Please see the mock client section in the official documentation.

Testing

composer test

Contributing

Please see our contributing guide.

Security

If you discover any security related issues, please contact us at [email protected].

Credits

Thanks to David de Boer for implementing the mock client.

License

The MIT License (MIT). Please see License File for more information.

More Repositories

1

httplug

HTTPlug, the HTTP client abstraction for PHP
PHP
2,548
star
2

promise

Promise used for asynchronous HTTP requests
PHP
1,779
star
3

guzzle6-adapter

Guzzle 6 HTTP adapter
PHP
1,375
star
4

message-factory

Abandoned: Httplug Factory interfaces for PSR-7 HTTP Message
PHP
1,369
star
5

message

HTTP Message related tools
PHP
1,282
star
6

discovery

Finds installed clients and message factories
PHP
1,248
star
7

client-common

Common HTTP Client implementations and tools for HTTPlug
PHP
997
star
8

curl-client

cURL client
PHP
443
star
9

HttplugBundle

Symfony Framework Integration for HTTPlug
PHP
381
star
10

logger-plugin

PSR-3 Logger plugin for HTTPlug
PHP
282
star
11

multipart-stream-builder

Build a multipart stream independently form any PSR7 Stream implementation
PHP
260
star
12

stopwatch-plugin

Symfony Stopwatch plugin for HTTPlug
PHP
260
star
13

cache-plugin

PSR-6 Cache plugin for HTTPlug
PHP
248
star
14

socket-client

Socket HTTP Client
PHP
80
star
15

guzzle7-adapter

Guzzle 7 adapter
PHP
71
star
16

psr7-integration-tests

PHP
39
star
17

httplug-flex-pack

A "pack" recipe for Symfony flex
39
star
18

documentation

Documentation for PHP-HTTP including HTTPlug
Python
23
star
19

vcr-plugin

Record your test suite's HTTP interactions and replay them during future test runs.
PHP
20
star
20

react-adapter

React HTTP Adapter
PHP
19
star
21

client-integration-tests

HTTP client integration tests
PHP
15
star
22

awesome-http

A curated list of amazingly awesome PHP libraries, resources and shiny things related to HTTP
15
star
23

plugins

[DEPRECATED] Plugin client, decorate HTTP client with middlewares
PHP
12
star
24

laravel-httplug

Laravel package for HTTPlug
PHP
12
star
25

guzzle5-adapter

Guzzle 5 HTTP adapter
PHP
10
star
26

artax-adapter

Artax HTTP Adapter
PHP
5
star
27

cakephp-adapter

CakePHP Adapter for HTTPlug
PHP
5
star
28

boilerplate

Boilerplate for packages
PHP
4
star
29

demo-library

PHP
3
star
30

httplug-async

[DEPRECATED] HTTPlug Async, the HTTP asynchronous client abstraction for PHP http://httplug.io
PHP
3
star
31

buzz-adapter

Buzz HTTP adapter
PHP
3
star
32

httplug.github.io

HTTPlug website
JavaScript
3
star
33

zend-adapter

Zend Adapter for HTTPlug
PHP
2
star
34

.github

Default community health files
2
star
35

utils

[DEPRECATED] HTTP Client Utilities
PHP
2
star
36

throttle-plugin

PHP-HTTP plugin for throttling/rate limiting with the symfony/rate-limiter
PHP
2
star
37

api.php-http.org

API documentation for PHP HTTP projects
HTML
1
star
38

random-host-plugin

Client-side round robin load balancer plugin for HTTPlug
PHP
1
star
39

helper

[DEPRECATED] Helper classes for HTTP related data
PHP
1
star
40

adapter-integration-tests

[DEPRECATED] Please use https://github.com/php-http/client-integration-tests
PHP
1
star
41

httplug-stream-wrapper

PHP
1
star