value)->toBe($value); }); it('is equal to a hashcode with the same value', function () use ($value): void { // GIVEN $hashcode = new CrmHashcode($value); $other = new CrmHashcode($value); // WHEN / THEN expect($hashcode->equals($other))->toBeTrue(); }); it('is not equal to a hashcode with a different value', function () use ($value): void { // GIVEN $hashcode = new CrmHashcode($value); $other = new CrmHashcode(Uuid::uuid4()); // WHEN / THEN expect($hashcode->equals($other))->toBeFalse(); }); it('is not equal to a value that is not a hashcode', function () use ($value): void { // GIVEN $hashcode = new CrmHashcode($value); // WHEN / THEN expect($hashcode->equals($value))->toBeFalse() ->and($hashcode->equals(null))->toBeFalse(); }); });