Refactor/php unit tests