Attempting to create an intelligent mock of the Google API PHP Client for unit and functional testing