Make php5 tests more robust