sebastianbergmann/phpunit — comment on commit 7fb91fa2747b470fbffa48c9112dd5b526673e55
File:  line 0
By hakre:

convert the float to strings and compare the two strings being identical (after it has been checked that the two variables were float). I think this will cover ~INF, too.