TenantAtlas/tests/Unit/Evidence/EvidenceSnapshotFingerprintTest.php
2026-03-19 14:27:51 +01:00

20 lines
439 B
PHP

<?php
declare(strict_types=1);
use App\Services\Evidence\EvidenceSnapshotFingerprint;
it('creates stable fingerprints regardless of array key order', function (): void {
$first = EvidenceSnapshotFingerprint::hash([
'b' => ['z' => 1, 'a' => 2],
'a' => 3,
]);
$second = EvidenceSnapshotFingerprint::hash([
'a' => 3,
'b' => ['a' => 2, 'z' => 1],
]);
expect($first)->toBe($second);
});