pest
pest copied to clipboard
[Bug]: Laravel preset architecture test expect Event Subscriber to have method `handle`
What Happened
When using the laravel preset architecture in the test and you define an event subscriber the test fails, because preset expect event to have handle method.
You can define event subscriber in the listeners folder as defined in de documentation: https://laravel.com/docs/11.x/events#event-subscribers. Now the present gives this error:
Expecting 'app/Listeners/UserEventSubscriber.php' to have method 'handle'.
Maybe ignore the suffix Subscriber in the Listener folder?
How to Reproduce
Create event subscriber in listener folder and use laravel preset.
Sample Repository
No response
Pest Version
3.7.1
PHP Version
8.4.2
Operation System
macOS
Notes
No response