<?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);
});
