Overview for phpunit

Testing PHP PSR-7 Middleware

Lots of Middleware is being written for PHP, most of it compatible with PSR-7 messages - here's how I've been testing some middleware I've written for apps in Slim.

Anonymous classes in PHP 7 are fantastic for tests

I recently found myself writing some integration tests (or whatever you'd like to call them, people will argue about terminology for hours) for an app. Anonymous classes made testing the real implementation of my interface really easy, here's how.