#development #laravel #php #reading-list #testing

🔗 Get more specific when asserting events dispatched
masteringlaravel.io

Laravel offers so many excellent test helpers that let you write expressive tests with minimal effort.

For example, you can use Event::assertDispatched in a feature test to assert that a specific event was dispatched.

This method allows you to just specify the event name, but you can go a step further and provide a callback to make additional assertions about the event.

continue reading on masteringlaravel.io

⚠️ This post links to an external website. ⚠️