driftingly / rector-laravel

Rector upgrades rules for Laravel
http://getrector.org
MIT License
500 stars 49 forks source link

Replaces without jobs/events/notifications to the appropriate facade #166

Closed peterfox closed 8 months ago

peterfox commented 8 months ago

Another change related to the deprecated trait

-$this->withoutJobs();
-$this->withoutEvents();
-$this->withoutNotifications();
+\Illuminate\Support\Facades\Bus::fake();
+\Illuminate\Support\Facades\Event::fake();
+\Illuminate\Support\Facades\Notification::fake();

This should be pretty straight forward when used to stop no Jobs/Events/Notifications to be fired during tests.