Port all remaining tests to PHPUnit