laravel / framework

The Laravel Framework.
https://laravel.com
MIT License
32.64k stars 11.04k forks source link

[11.x] Add `assertCount` method to `EventFake` for asserting total dispatched events #53545

Closed xurshudyan closed 3 days ago

xurshudyan commented 5 days ago

This PR introduces a new assertCount method in the EventFake class, providing a simple and reliable way to assert the total number of events dispatched.

taylorotwell commented 3 days ago

Thanks for your pull request to Laravel!

Unfortunately, I'm going to delay merging this code for now. To preserve our ability to adequately maintain the framework, we need to be very careful regarding the amount of code we include.

If applicable, please consider releasing your code as a package so that the community can still take advantage of your contributions!