<?php
use App\Support\Security\Redactor;

it('redacts nested credentials and secrets', function () {
    $result = Redactor::redact(['x-api-key'=>'pk_live_secret','nested'=>['password'=>'secret','safe'=>'value']]);
    expect($result['x-api-key'])->toBe('[REDACTED]')
        ->and($result['nested']['password'])->toBe('[REDACTED]')
        ->and($result['nested']['safe'])->toBe('value');
});
