Portugal's victory came just days after a shock 2-0 defeat to the Republic of Ireland that saw captain Cristiano Ronaldo sent off.