Fixing exception thrown phpspec