A 38-year-old man has pleaded not guilty to attacking a police officer in Wigan.