SHARE
TWEET

Untitled

a guest Apr 20th, 2019 73 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. });
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top