If he declares the two testimonies without the acknowledgment of its meanings and without commitment to them in such a way that he does not see himself, because of this, as a Muslim, then he is not considered as one and the marriage to him is invalid. If his testimony was with the acknowledgment of its meanings and commitment to them in such a way that he considers himself to be a Muslim, then he is one and the marriage with him is valid.