You're viewing an older version of this documentation. View the latest version (2.x)
Queue Worker
Fake Queue Worker#
Example test case#
Copied!
use Native\Laravel\Facades\QueueWorker;use Native\Laravel\DTOs\QueueConfig; #[\PHPUnit\Framework\Attributes\Test]public function example(): void{ QueueWorker::fake(); $this->get('/whatever-action'); QueueWorker::assertUp(fn (QueueConfig $config) => $config->alias === 'custom');}
Available assertions#
assertUpassertDown
NativePHP
Bring your
Laravel
skills to
mobile apps.
NativePHP Ultra
All NativePHP plugins, teams & priority support from
$35/mo
Learn More
The Vibes
The unofficial Laracon US
Day 3
Grab Your Spot
Only 100 tickets!
The Masterclass
Go from zero to
published app
in no time
in no time
Learn More
Early Bird Pricing