I wrote this post to make it easier for you to test your PHP application. The first two tricks are related to the Symfony web framework and functional/integration testing in this framework, but the second one is a pattern that every PHP engineer should know.
Definitions should looks like: Thanks to this you can make some fast functional tests of your application.
Thanks to this you can easier test some services that are registered as a private for the container.
Sometimes your testing code — especially given section may look not that cool as you want it to be.