/** * @see Comparable::equals * * Two properties are considered equal if they are of the same * type and have the same value. The value does not include * the id, so entities with the same value but different id * are considered equal. * * @since 0.1 * * @param mixed $target * * @return bool */ public function equals($target) { if ($this === $target) { return true; } return $target instanceof self && $this->dataTypeId === $target->dataTypeId && $this->fingerprint->equals($target->fingerprint) && $this->statements->equals($target->statements); }
private function assetFingerprintEquals(Fingerprint $expected, Fingerprint $actual) { // TODO: Compare serializations. $this->assertTrue($expected->equals($actual), 'Fingerprint mismatches'); }
/** * @dataProvider differentFingerprintsProvider */ public function testDifferentFingerprintsDoNotEqual(Fingerprint $one, Fingerprint $two) { $this->assertFalse($one->equals($two)); }
private function assertFingerprintResultsFromPatch(Fingerprint $expected, Fingerprint $original, EntityDiff $patch) { $this->assertTrue($expected->equals($this->getPatchedFingerprint($original, $patch))); }