migrate tests to PHPUnit