PHPackages                             astrotomic/pest-plugin-laravel-snapshots - 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. astrotomic/pest-plugin-laravel-snapshots

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

astrotomic/pest-plugin-laravel-snapshots
========================================

This package adds snapshot testing capabilities to Laravel HTTP tests with Pest.

0.1.0(5y ago)532MITPHPPHP ^7.4CI passing

Since Jun 24Pushed 4y ago1 watchersCompare

[ Source](https://github.com/Astrotomic/pest-plugin-laravel-snapshots)[ Packagist](https://packagist.org/packages/astrotomic/pest-plugin-laravel-snapshots)[ Docs](https://github.com/Astrotomic/pest-plugin-laravel-snapshots)[ Fund](https://offset.earth/treeware)[ GitHub Sponsors](https://github.com/Gummibeer)[ RSS](/packages/astrotomic-pest-plugin-laravel-snapshots/feed)WikiDiscussions main Synced 2d ago

READMEChangelog (2)Dependencies (5)Versions (3)Used By (0)

Pest Laravel Snapshot Assertions
================================

[](#pest-laravel-snapshot-assertions)

[![Latest Version](https://camo.githubusercontent.com/d818799c59eb40569be1239aeefff63a0eff9bd7cbeb5c71f802448282dcdabf/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f617374726f746f6d69632f706573742d706c7567696e2d6c61726176656c2d736e617073686f74732e7376673f6c6162656c3d52656c65617365267374796c653d666f722d7468652d6261646765)](https://packagist.org/packages/astrotomic/pest-plugin-laravel-snapshots)[![MIT License](https://camo.githubusercontent.com/9c9dd64c238a6cd309d6a122e50fdf792db7441f1d106ac52a7c8bae58e3ca49/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f417374726f746f6d69632f706573742d706c7567696e2d6c61726176656c2d736e617073686f74732e7376673f6c6162656c3d4c6963656e736526636f6c6f723d626c7565267374796c653d666f722d7468652d6261646765)](https://github.com/Astrotomic/pest-plugin-laravel-snapshots/blob/master/LICENSE)[![Offset Earth](https://camo.githubusercontent.com/d204555ebe1fb0ae82d10c97b4f4ffc2dfdd2ba1489f98be7f7e8708333a0466/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f54726565776172652d2546302539462538432542332d677265656e3f7374796c653d666f722d7468652d6261646765)](https://plant.treeware.earth/Astrotomic/pest-plugin-laravel-snapshots)[![Larabelles](https://camo.githubusercontent.com/a2c8d5126ddd8c5ddc627176d1d2e0568f8399b50038e71fd7f774c3e24dbe4b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726162656c6c65732d2546302539462541362538342d6c6967687470696e6b3f7374796c653d666f722d7468652d6261646765)](https://www.larabelles.com/)

[![GitHub Workflow Status](https://camo.githubusercontent.com/6880927a72857ae312f95057974a387a1e7958b85c0f4fbf2ccb33f9c77b8b6e/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f417374726f746f6d69632f706573742d706c7567696e2d6c61726176656c2d736e617073686f74732f72756e2d74657374733f7374796c653d666c61742d737175617265266c6f676f436f6c6f723d7768697465266c6f676f3d676974687562266c6162656c3d5465737473)](https://github.com/Astrotomic/pest-plugin-laravel-snapshots/actions?query=workflow%3Arun-tests)[![StyleCI](https://camo.githubusercontent.com/de4451a10c3c2842b1e51c0cc747a04c7683760180c4e5deaa2835527df20ea8/68747470733a2f2f7374796c6563692e696f2f7265706f732f3237343532343139362f736869656c64)](https://styleci.io/repos/274524196)[![Total Downloads](https://camo.githubusercontent.com/6054d704807bf909e73075df59ff1be129d197a0754b141f1bc599a8e06b517f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f617374726f746f6d69632f706573742d706c7567696e2d6c61726176656c2d736e617073686f74732e7376673f6c6162656c3d446f776e6c6f616473267374796c653d666c61742d737175617265)](https://packagist.org/packages/astrotomic/pest-plugin-laravel-snapshots)

This package adds snapshot testing capabilities to Laravel HTTP tests with **[Pest](https://pestphp.com)**. It uses the [phpunit-snapshot-assertions](https://github.com/spatie/phpunit-snapshot-assertions) package making snapshot assertions available in Pest HTTP tests.

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

[](#installation)

You can install the package via composer:

```
composer require astrotomic/pest-plugin-laravel-snapshots --dev
```

Usage
-----

[](#usage)

At first you should use [orchestra/testbench](https://github.com/orchestral/testbench) which adds the HTTP helper methods that return a `\Illuminate\Testing\TestResponse` instance.

```
use Orchestra\Testbench\TestCase;
uses(TestCase::class);

// long
test('html response body matches with snapshot')
    ->get('/html')
    ->assertMatchesHtmlSnapshot();

// short
// https://github.com/pestphp/pest-plugin-laravel
use function Pest\Laravel\get;
get('/html')->assertMatchesHtmlSnapshot();
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

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

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

[](#contributing)

Please see [CONTRIBUTING](https://github.com/Astrotomic/.github/blob/master/CONTRIBUTING.md) for details. You could also be interested in [CODE OF CONDUCT](https://github.com/Astrotomic/.github/blob/master/CODE_OF_CONDUCT.md).

### Security

[](#security)

If you discover any security related issues, please check [SECURITY](https://github.com/Astrotomic/.github/blob/master/SECURITY.md) for steps to report it.

Credits
-------

[](#credits)

- [Tom Witkowski](https://github.com/Gummibeer)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

Treeware
--------

[](#treeware)

You're free to use this package, but if it makes it to your production environment I would highly appreciate you buying the world a tree.

It’s now common knowledge that one of the best tools to tackle the climate crisis and keep our temperatures from rising above 1.5C is to [plant trees](https://www.bbc.co.uk/news/science-environment-48870920). If you contribute to my forest you’ll be creating employment for local families and restoring wildlife habitats.

You can buy trees at [offset.earth/treeware](https://plant.treeware.earth/Astrotomic/pest-plugin-laravel-snapshots)

Read more about Treeware at [treeware.earth](https://treeware.earth)

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 93.1% 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 ~8 days

Total

2

Last Release

2141d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/eb5d60f7dd33ef3680490f11b3cd461b0c7a5dcddfe69d57fb1f6a3406be4570?d=identicon)[Gummibeer](/maintainers/Gummibeer)

---

Top Contributors

[![Gummibeer](https://avatars.githubusercontent.com/u/6187884?v=4)](https://github.com/Gummibeer "Gummibeer (27 commits)")[![dependabot-preview[bot]](https://avatars.githubusercontent.com/in/2141?v=4)](https://github.com/dependabot-preview[bot] "dependabot-preview[bot] (1 commits)")[![nunomaduro](https://avatars.githubusercontent.com/u/5457236?v=4)](https://github.com/nunomaduro "nunomaduro (1 commits)")

---

Tags

hacktoberfesthttplaravelpestsnapshotsnapshot-testingtesttestinghttptestingtestpestlaravelsnapshot

### Embed Badge

![Health badge](/badges/astrotomic-pest-plugin-laravel-snapshots/health.svg)

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

###  Alternatives

[defstudio/pest-plugin-laravel-expectations

A plugin to add laravel tailored expectations to Pest

98548.9k4](/packages/defstudio-pest-plugin-laravel-expectations)[pestphp/pest-plugin-drift

The Pest Drift Plugin

734.0M74](/packages/pestphp-pest-plugin-drift)

PHPackages © 2026

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