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)12.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 today

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

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

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

4089d 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

[symfony/http-kernel

Provides a structured process for converting a Request into a Response

8.1k869.4M8.8k](/packages/symfony-http-kernel)[behat/behat

Scenario-oriented BDD framework for PHP

4.0k101.8M2.2k](/packages/behat-behat)[symfony/framework-bundle

Provides a tight integration between Symfony components and the Symfony full-stack framework

3.6k251.7M11.6k](/packages/symfony-framework-bundle)[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k17.9M388](/packages/easycorp-easyadmin-bundle)[phpro/grumphp

A composer plugin that enables source code quality checks.

4.3k16.7M1.0k](/packages/phpro-grumphp)[symfony/security-bundle

Provides a tight integration of the Security component into the Symfony full-stack framework

2.5k185.6M2.4k](/packages/symfony-security-bundle)

PHPackages © 2026

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