Convert to PHPUnit

Here it is, all cleaned up

Since this is not merged yet, I've been working on the functional test aspects and am close to getting that working, so I'll add to the PR