For the TAP legs, you will probably earn some miles at least for a classic fare but how many no one can say. TAP does some funny mapping thing where the class they report to partner FFPs based on your fare family and not your actual fare class but they don't publicize this anywhere.