fixed phpspec specs (cherry pick)