Completely depends on the fare class. The TAP fare classes in the attached link earn UA miles at the rates specified. You'll probably have to ask LH what the corresponding TP fare class is for the flight you're looking at:
http://www.united.com/CMS/en-US/mark...spx?ItemId=319