ohseesoftware/laravel-queue-fake is a Laravel package for describe your package here..
It currently has 9 GitHub stars and 180 downloads on Packagist (latest version v1.1.0).
Install it with composer require ohseesoftware/laravel-queue-fake.
Discover more Laravel packages by ohseesoftware
or browse all Laravel packages to compare alternatives.
Last updated
There may be times in your Laravel tests where you want to fake the Queue just for a couple lines, and then revert to the real queue after. This package makes that super simple to do:
// Given
// Queue is real there
// When
QueueFake::wrap(function () use (&$value) {
// Queue is faked inside this function
});
// Queue is back to normal here
composer require ohseesoftware/laravel-queue-fake
Imagine you need to fake the queue to call your factories to setup your models, but also want to test a job:
// Given
$user = null;
QueueFake::wrap(function () use (&$user) {
// Queue is faked inside this function
$user = factory(User::class)->create();
});
// When
// Queue is back to normal so we can dispatch, etc
SomeJob::dispatch($user);
// Then
$this->assertDatabaseHas('some-table', [
'id' => 1
]);
Please see CHANGELOG for more information what has changed recently.
Please see CONTRIBUTING for details.
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.
This package was generated using the Laravel Package Boilerplate.