NativePHP
📲  Join the NativePHP for mobile Early Access Program →

Queue Worker


NativePHP is currently in beta

Let's get to v1!

#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

  • assertUp
  • assertDown