Yes, he did!Muhammad didn't testify anything about Jesus and Mary.
And he did it through Qur'aan that Jesus was the son of a woman by the name Mary. Refuted that God had begotten no son and neither had taken one. In addition, condemned and denied the alleged trinity.
Read Qur'aan to discover. Surahs 2, 5 and 19 should be enough for you.