The test have to based on a sample taken within 3 days, if someone has already contracted by the infection, a certificate and a medical documentation  are suitable for travel. Be sure to consult with your airline in advance regarding the required documentation, as they will prescribe the exact regulations. Details are in English

here