This is highly dependent on the professor of the class in question. Professor's will sometimes offer a student the option of testing out of a class. It of course depends on the institution exactly what goes on the transcript in these cases, but usually it will not count towards the GPA an will be treated in a manner similar to AP credit.