<?php

declare(strict_types=1);

use Illuminate\Console\Scheduling\Schedule;

it('schedules baseline evidence policy version pruning daily without overlapping', function (): void {
    /** @var Schedule $schedule */
    $schedule = app(Schedule::class);

    $event = collect($schedule->events())
        ->first(fn ($event) => ($event->description ?? null) === 'tenantpilot:baseline-evidence:prune');

    expect($event)->not->toBeNull();
    expect($event->withoutOverlapping)->toBeTrue();
});
