Skip to content
This repository was archived by the owner on Nov 20, 2025. It is now read-only.
This repository was archived by the owner on Nov 20, 2025. It is now read-only.

Mock queue #28

@fklee

Description

@fklee

Hi,

I started to use your package which is extra to mock, and test mails ! Top. But now I would like to mock Laravel Queues and after doing this :
$queue = $browser->fake(Queue::class); [...] $queue->assertNotPushed(SynchrUser::class);
And I get this error :
Browser\UserActions ✘ Register │ │ Exception: Unable to retrieve mock for [Illuminate\Support\Facades\Queue]. │ │ /var/www/emploi2/vendor/noeldemartin/laravel-dusk-mocking/src/MockingProxy.php:50 │ /var/www/emploi2/tests/Browser/UserActionsTest.php:102 │ /var/www/emploi2/vendor/laravel/dusk/src/Concerns/ProvidesBrowser.php:68 │ /var/www/emploi2/tests/Browser/UserActionsTest.php:114 │
I wondering if I was doing something wrong as Queue have all already a mock as mail ?
Sorry for this post, but now you could mention that queue fork would not be possible. I just found the error :
Serialization of 'Closure' is not allowed at .../noeldemartin/laravel-dusk-mocking/src/Driver.php:151)

Have you already have this issue. Is it possible to find a turnaround ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions