tests: continued to port to phpunit, and cleaned up some code