PHPackages                             phpjuice/pest-plugin-vcr - 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. phpjuice/pest-plugin-vcr

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

phpjuice/pest-plugin-vcr
========================

Integrates Pest with PHP-VCR

v1.0.2(4y ago)74.0k1MITPHPPHP ^7.4|^8.0

Since Aug 28Pushed 4y ago1 watchersCompare

[ Source](https://github.com/phpjuice/pest-plugin-vcr)[ Packagist](https://packagist.org/packages/phpjuice/pest-plugin-vcr)[ Docs](https://github.com/phpjuice/pest-plugin-vcr)[ RSS](/packages/phpjuice-pest-plugin-vcr/feed)WikiDiscussions main Synced 6d ago

READMEChangelog (3)Dependencies (4)Versions (4)Used By (0)

Pest plugin for PHP-VCR
=======================

[](#pest-plugin-for-php-vcr)

[![GitHub Actions](https://github.com/phpjuice/pest-plugin-vcr/actions/workflows/ci.yml/badge.svg)](https://github.com/phpjuice/pest-plugin-vcr/actions/workflows/ci.yml/badge.svg)[![Latest Stable Version](https://camo.githubusercontent.com/24e6f79541c88369bc55851955052249f10de23fe87c250eea865ca518f7c1ae/687474703a2f2f706f7365722e707567782e6f72672f7068706a756963652f706573742d706c7567696e2d7663722f76)](https://packagist.org/packages/phpjuice/pest-plugin-vcr)[![Total Downloads](https://camo.githubusercontent.com/d4773f51e9311d66163b21822184ce77f1855a52b834e280b8aae9c74bcedfc7/687474703a2f2f706f7365722e707567782e6f72672f7068706a756963652f706573742d706c7567696e2d7663722f646f776e6c6f616473)](https://packagist.org/packages/phpjuice/pest-plugin-vcr)[![License](https://camo.githubusercontent.com/fe6750ccdef60c373e21bf19fc7f6f897a350309fb1be9480e72b493da6e0f17/687474703a2f2f706f7365722e707567782e6f72672f7068706a756963652f706573742d706c7567696e2d7663722f6c6963656e7365)](https://packagist.org/packages/phpjuice/pest-plugin-vcr)

Integrates Pest with [PHP-VCR](http://php-vcr.github.io) using plugins.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require phpjuice/pest-plugin-vcr --dev
```

Setup
-----

[](#setup)

Add new folder inside tests to store cassettes:

```
mkdir tests/cassettes
```

Add the following line to your `Pest.php` file, this will tell VCR where to look for `cassettes`:

```
use VCR\VCR;

VCR::configure()->setCassettePath(__DIR__.'/cassettes');
```

Usage
-----

[](#usage)

This plugin will provide you with two handy functions `vcrTurnOn` &amp; `vcrTurnOff` to turn on and off the http recording :

```
it('records requests to pestphp.com', function () {

    vcrTurnOn('pestphp.com');

    $result = file_get_contents('https://pestphp.com/');

    expect($result)
        ->toBe('Hello from pestphp.');

    vcrTurnOff();
});
```

The previous testsuite, will first send a request to `pestphp.com` and Record your test suite's HTTP interactions into a cassette and replay them during future test runs for fast, deterministic, accurate tests.

> **Important** before running your tests make sure to have the following folder `tests/cassettes`

### Testing

[](#testing)

```
composer test
```

### Changelog

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

### Security

[](#security)

If you discover any security related issues, send us an email to  instead of using the issue tracker.

Credits
-------

[](#credits)

- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

PHP Package Boilerplate
-----------------------

[](#php-package-boilerplate)

This package was generated using the [PHP Package Boilerplate](https://laravelpackageboilerplate.com) by [Beyond Code](http://beyondco.de/).

[![GitHub Actions](https://github.com/phpjuice/pest-plugin-vcr/actions/workflows/ci.yml/badge.svg)](https://github.com/phpjuice/pest-plugin-vcr/actions/workflows/ci.yml/badge.svg)[![Latest Stable Version](https://camo.githubusercontent.com/24e6f79541c88369bc55851955052249f10de23fe87c250eea865ca518f7c1ae/687474703a2f2f706f7365722e707567782e6f72672f7068706a756963652f706573742d706c7567696e2d7663722f76)](https://packagist.org/packages/phpjuice/pest-plugin-vcr)[![Total Downloads](https://camo.githubusercontent.com/d4773f51e9311d66163b21822184ce77f1855a52b834e280b8aae9c74bcedfc7/687474703a2f2f706f7365722e707567782e6f72672f7068706a756963652f706573742d706c7567696e2d7663722f646f776e6c6f616473)](https://packagist.org/packages/phpjuice/pest-plugin-vcr)[![License](https://camo.githubusercontent.com/fe6750ccdef60c373e21bf19fc7f6f897a350309fb1be9480e72b493da6e0f17/687474703a2f2f706f7365722e707567782e6f72672f7068706a756963652f706573742d706c7567696e2d7663722f6c6963656e7365)](https://packagist.org/packages/phpjuice/pest-plugin-vcr)

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity23

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

Every ~1 days

Total

3

Last Release

1720d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/071fef576e19ad7fd90ce1f76ea74521225728cb9fd97c2fc48a1e9a41978f65?d=identicon)[mhdcodes](/maintainers/mhdcodes)

---

Top Contributors

[![mhdcodes](https://avatars.githubusercontent.com/u/9967336?v=4)](https://github.com/mhdcodes "mhdcodes (14 commits)")

---

Tags

pestpest-vcrphp-vcrvcrphpjuicepest-plugin-vcr

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/phpjuice-pest-plugin-vcr/health.svg)

```
[![Health](https://phpackages.com/badges/phpjuice-pest-plugin-vcr/health.svg)](https://phpackages.com/packages/phpjuice-pest-plugin-vcr)
```

###  Alternatives

[phpspec/prophecy

Highly opinionated mocking framework for PHP 5.3+

8.5k551.7M682](/packages/phpspec-prophecy)[vimeo/psalm

A static analysis tool for finding errors in PHP applications

5.8k77.5M6.7k](/packages/vimeo-psalm)[brianium/paratest

Parallel testing for PHP

2.5k118.8M754](/packages/brianium-paratest)[beberlei/assert

Thin assertion library for input validation in business models.

2.4k96.9M570](/packages/beberlei-assert)[orchestra/testbench

Laravel Testing Helper for Packages Development

2.2k39.1M32.1k](/packages/orchestra-testbench)[phpspec/phpspec

Specification-oriented BDD framework for PHP 7.1+

1.9k36.7M3.1k](/packages/phpspec-phpspec)

PHPackages © 2026

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