Mocking
Introduction
Events Using Mocks Using Fakes
Jobs Using Mocks Using Fakes Mail Fakes Notification Fakes Facades
Introduction
When testing Laravel applications, you may wish to "mock" certain aspects of your application so they are not actually executed during a given test. For example, when testing a controller that fires an event, you may wish to mock the event listeners so they are not actually executed during the test. This allows you to only test the controller's HTTP response