Testing framework-backed APIs with PHP’s internal web server

Recently I had to prepare functional tests for a set of (RESTish) APIs in a Silex-backed application. The problem is that I couldn’t test POST, PUT and DELETE methods on the development environment or (worse) on the staging server.

So I came up with the idea of using the PHP integrated webserver, started from the PHPUnit bootstrap, and a couple of rules in the app bootstrap to redirect all storage calls to a temporary database.

Continue reading


As nobody notices, I am working on bringing this blog back to life.

And, given that I moved to the UK, I am going to (try to) write everything in english.

The old posts will remain in italian, as they could contain useful informations.

See you soon! :)