On 18 January 2017, de Villiers ruled himself out from most of the Test matches and ultimately played in December 2017. However, a day before the Test match, Faf du Plessis picked up a viral infection, putting him in doubt for the match. On the morning of the Test, he was ruled out of the fixture, with AB de Villiers replacing him as captain. He also kept wicket during the match, as South Africa's wicket-keeper Quinton de Kock suffered a hamstring injury while batting on day one. He took eight catches in the match and the Test match finished inside two days, with South Africa winning by an innings and 120 runs.