V to n
II.3 The 'swear' group
These verbs are concerned with saying firmly or formally that something happened, exists, or is true.
But he didn't plant that key here, or make you an anonymous call. I'm prepared to swear to that.
The preposition to is sometimes followed by an '-ing' clause.
attest swear testify
Eva testified to having seen the defendant with his gun on the stairs.