Fix update and enhance php unit tests