In short, if you're using custom type mapping in Doctrine to store and retrieve objects (or even custom-named scalar values, I suppose), the strict equality check can lead to false-positives in tests that would pass in the actual database due to the storage conversion layer.
The most-complete solution would actually use Doctrine\DBAL\Types\* to convert to the storage format for ALL fields. Test bootstrapping would need to supplement the TypeRegistry (just as would normally occur) and then the comparison functions could encode with that type.
That probably also requires setting up some sort of AbstractPlatform... this gets complex fast.