wmde/WikibaseDataModel — pull request #327 by thiemowmde (2014-12-11 10:16:53+00:00)
Title: More robust Snak::equals

Comparing with `self` is dangerous in an abstract base class because this compares the base class, not the sub classes. It's not a problem in this case because `getHash` contains the sub class name and is guaranteed to be different. But if we ever change `serialize` (as already discussed) `equals` may fail. Adding tests to make sure this never happens.

https://github.com/DataValues/DataValues/pull/12 does the same for the abstract `DataValueObject::equals`.