<?php

it('registers economic v2 backfill command in cli dispatcher', function (): void {
    $cliFile = app_path('cli.php');
    $content = file_get_contents($cliFile);

    expect($content)->not->toBeFalse();
    expect($content)->toContain("case 'economic-v2-backfill':");
    expect($content)->toContain("require_once 'cron/BackfillEconomicV2History.php';");
});

it('provides a backfill cron script entrypoint', function (): void {
    $script = app_path('cron/BackfillEconomicV2History.php');
    expect(is_file($script))->toBeTrue();

    $content = file_get_contents($script);
    expect($content)->not->toBeFalse();
    expect($content)->toContain('runBestEffortBackfill(');
});
