Advertisement
Guest User

Untitled

a guest
Apr 20th, 2019
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. <?php
  2.  
  3. use App\Listeners\SendWelcomeEmail;
  4. use Illuminate\Support\Facades\Queue;
  5. use Illuminate\Events\CallQueuedListener;
  6.  
  7. // Test setup and so on...
  8.  
  9. Queue::fake();
  10.  
  11. // Perform the thing that fires the events
  12.  
  13. Queue::assertPushed(CallQueuedListener::class, function ($job) {
  14. return $job->class === SendWelcomeEmail::class;
  15. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement