Regina says that Angelo secretly swabbed Daphne's mouth and that's how he new they weren't biologically related.
However, in a later episode when John mentions the switch to him, he appears to have no idea what John is talking about and he and Regina have an argument about it later.