PHPackages                             e-moe/guzzle-regexp-mock-plugin - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Testing &amp; Quality](/categories/testing)
4. /
5. e-moe/guzzle-regexp-mock-plugin

ActiveLibrary[Testing &amp; Quality](/categories/testing)

e-moe/guzzle-regexp-mock-plugin
===============================

Mock plugin for Guzzle3 with regexp match urls

v1.0.0(11y ago)02.1kMITPHPPHP &gt;=5.3.3

Since Apr 24Pushed 11y ago2 watchersCompare

[ Source](https://github.com/e-moe/guzzle-regexp-mock-plugin)[ Packagist](https://packagist.org/packages/e-moe/guzzle-regexp-mock-plugin)[ Docs](https://github.com/e-moe/guzzle-regexp-mock-plugin)[ RSS](/packages/e-moe-guzzle-regexp-mock-plugin/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (2)Used By (0)

Guzzle regexp mock plugin
=========================

[](#guzzle-regexp-mock-plugin)

The mock plugin is useful for testing Guzzle clients. The mock plugin allows you to queue an array of responses that will satisfy requests sent from a client by consuming the request queue in FIFO order. Each request may have optional regexp url match pattern.

*Based on standard mock plugin - *

```
use Guzzle\Http\Client;
use Guzzle\Http\Message\Response;
use Emoe\GuzzleRegexpMockPlugin\MockPlugin;

$client = new Client('http://www.test.com/');

$mock = new MockPlugin();
$mock->addResponse(new Response(200), '/(foo|bar)page/')
     ->addResponse(new Response(200), '/article\/\w+/')
     ->addResponse(new Response(404)); // regexp pattern is optional

// Add the mock plugin to the client object
$client->addSubscriber($mock);

// The following request will receive a 200 response from the plugin regexp queue
$client->get('/foopage')->send();

// The following request will receive a 404 response from the plugin, default behaviour
$client->get('notfound')->send();

// The following request will receive a 200 response from the plugin regexp queue
$client->get('/article/about')->send();
```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

4043d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/bdc1cc4ac0c0b72352347f746d69d3213dfb8fbe9910cd43a02c5b3290e6b1f1?d=identicon)[e-moe](/maintainers/e-moe)

---

Top Contributors

[![e-moe](https://avatars.githubusercontent.com/u/963424?v=4)](https://github.com/e-moe "e-moe (6 commits)")

---

Tags

guzzlemockphppluginpluginGuzzlemockregexp

### Embed Badge

![Health badge](/badges/e-moe-guzzle-regexp-mock-plugin/health.svg)

```
[![Health](https://phpackages.com/badges/e-moe-guzzle-regexp-mock-plugin/health.svg)](https://phpackages.com/packages/e-moe-guzzle-regexp-mock-plugin)
```

###  Alternatives

[mockery/mockery

Mockery is a simple yet flexible PHP mock object framework

10.7k497.0M23.6k](/packages/mockery-mockery)[phpspec/prophecy

Highly opinionated mocking framework for PHP 5.3+

8.5k551.7M682](/packages/phpspec-prophecy)[dealerdirect/phpcodesniffer-composer-installer

PHP\_CodeSniffer Standards Composer Installer Plugin

598161.9M1.9k](/packages/dealerdirect-phpcodesniffer-composer-installer)[php-mock/php-mock

PHP-Mock can mock built-in PHP functions (e.g. time()). PHP-Mock relies on PHP's namespace fallback policy. No further extension is needed.

36918.1M98](/packages/php-mock-php-mock)[blastcloud/guzzler

Supercharge your app or SDK with a testing library specifically for Guzzle.

272419.3k35](/packages/blastcloud-guzzler)[brain/monkey

Mocking utility for PHP functions and WordPress plugin API

33812.5M350](/packages/brain-monkey)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
