[Work in Progress] Tests

This branch adds some basic unit and integration tests to phpmig.