PHPackages                             protonemedia/laravel-dusk-fakes - 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. protonemedia/laravel-dusk-fakes

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

protonemedia/laravel-dusk-fakes
===============================

Persistent Fakes for Laravel Dusk

1.9.0(3mo ago)2195.1k↓39.6%3[1 PRs](https://github.com/protonemedia/laravel-dusk-fakes/pulls)2MITPHPPHP ^8.2|^8.3|^8.4|^8.5CI passing

Since Sep 5Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/protonemedia/laravel-dusk-fakes)[ Packagist](https://packagist.org/packages/protonemedia/laravel-dusk-fakes)[ Docs](https://github.com/protonemedia/laravel-dusk-fakes)[ RSS](/packages/protonemedia-laravel-dusk-fakes/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (10)Versions (19)Used By (2)

Laravel Dusk Fakes
==================

[](#laravel-dusk-fakes)

[![Latest Version on Packagist](https://camo.githubusercontent.com/db98ca8696b1a0d53821bd36535b2ca07a73e187e96fd17ecfbd500f2060d1e7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f70726f746f6e656d656469612f6c61726176656c2d6475736b2d66616b65732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/protonemedia/laravel-dusk-fakes)[![run-tests](https://github.com/protonemedia/laravel-dusk-fakes/actions/workflows/run-tests.yml/badge.svg?branch=main)](https://github.com/protonemedia/laravel-dusk-fakes/actions/workflows/run-tests.yml)[![Total Downloads](https://camo.githubusercontent.com/c39a3bb8dc1223ee9a0583e0a861f196690c307d412d844b61e488fa57cc60e1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f70726f746f6e656d656469612f6c61726176656c2d6475736b2d66616b65732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/protonemedia/laravel-dusk-fakes)[![Buy us a tree](https://camo.githubusercontent.com/130148911f548b001b2ac68a32c0a06559977ca60ada3bf480c72ae4ea093175/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f54726565776172652d2546302539462538432542332d6c69676874677265656e)](https://plant.treeware.earth/protonemedia/laravel-dusk-fakes)

Sponsor Us
----------

[](#sponsor-us)

[![](https://camo.githubusercontent.com/b5348f68e9a1a6ff90432d75a6692be1d604b3320ce1fcabd4b1ef29668053c4/68747470733a2f2f696e657274696175692e636f6d2f76697369742d636172642e6a7067)](https://inertiaui.com/inertia-table?utm_source=github&utm_campaign=laravel-dusk-fakes)

❤️ We proudly support the community by developing Laravel packages and giving them away for free. If this package saves you time or if you're relying on it professionally, please consider [sponsoring the maintenance and development](https://github.com/sponsors/pascalbaljet) and check out our latest premium package: [Inertia Table](https://inertiaui.com/inertia-table?utm_source=github&utm_campaign=laravel-dusk-fakes). Keeping track of issues and pull requests takes time, but we're happy to help!

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

[](#installation)

You can install the package via composer:

```
composer require protonemedia/laravel-dusk-fakes --dev
```

### Persist Bus (queued jobs)

[](#persist-bus-queued-jobs)

Make sure you've set the `DUSK_FAKE_BUS` environment variable to `true` in the [Dusk environment](https://laravel.com/docs/9.x/dusk#environment-handling).

Finally, add the `PersistentBus` trait to your test. You don't have to manually call the `fake()` method on the `Bus` facade.

```
