Migrate tests to PHPUnit