<?php

use CodeIgniter\Test\CIUnitTestCase;

/**
 * @internal
 */
final class ProductionRoutesTest extends CIUnitTestCase
{
    public function testCriticalRoutesExist(): void
    {
        $routes = file_get_contents(APPPATH . 'Config/Routes.php');

        $required = [
            'Health::index',
            'Reports::kpi',
            'Units::printChecklist',
            'Compliance::printInspection',
            'Api\\WorkOrders::show',
            'Settings::workflow',
            'Settings::saveRoles',
            'Finance::issuePettyCash',
            'Finance::closePettyCash',
            'WorkOrders::qaApprove',
        ];

        foreach ($required as $needle) {
            $this->assertStringContainsString($needle, $routes, "Missing route target: {$needle}");
        }
    }
}
