A man who crashed into a police car in western Sydney, leaving an officer injured, has allegedly failed a drugs test.