You can extend PHPUnit by creating and using abstract test classes and traits - or by using PHPUnit's event system. As one of the contributors to PHPUnit's new event system, I will give you an overview of the iterations of PHPUnit's event systems, show how you can migrate from any of the previous event systems to PHPUnit's new event system, and share insights on components and the events in the new event system of PHPUnit.

Migrating an extension from the test listener event system to the hooks event system

Here is a https://github.com/johnkary/phpunit-speedtrap/pull/83, migrating johnkary/phpunit-speedtrap from the test listener event system to the hooks event system.

However, the hooks event system also has at least one disadvantage compared to the test listener event system.
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge. Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge.
Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Shirts painstakingly handcrafted by under-caffeinated developers. Shirts painstakingly handcrafted by under-caffeinated developers.
Community Partners