<?php

use App\Services\Intune\VersionDiff;

test('version diff summarizes changes', function () {
    $diff = new VersionDiff;

    $result = $diff->compare(
        ['a' => 1, 'b' => ['c' => 2]],
        ['a' => 1, 'b.c' => 3, 'd' => 4]
    );

    expect($result['summary']['added'])->toBe(1);
    expect($result['summary']['changed'])->toBe(1);
    expect($result['summary']['removed'])->toBe(0);
});
