It was the practice of the Prophet (peace and blessings be upon him):
"When he (peace and blessings be upon him) heard the mu'adhdhin pronouncing the testimony of faith, he would say: And I too, I too bear witness."
Hadith Referenceصحیح الجامع الصغیر / حرف الكاف / 4742
Hadith Gradingالألبانی:صحيح
Hadith Takhrij[د ك] عن عائشة. صحيح أبي داود ٥٣٨، صحيح الترغيب ٢٥٣: حم، جب.