tests: about 1/3 is ported to phpunit now, WIP