Files
laravel_school_api_old/tests/Architecture/RouteInventoryTest.php
T
2026-05-29 04:33:03 -04:00

22 lines
699 B
PHP

<?php declare(strict_types=1);
namespace Tests\Architecture;
use PHPUnit\Framework\TestCase;
final class RouteInventoryTest extends TestCase
{
public function test_generated_route_inventory_exists_and_has_governance_fields(): void
{
$path = dirname(__DIR__, 2).'/storage/app/generated/api-route-inventory.json';
$this->assertFileExists($path);
$rows = json_decode(file_get_contents($path) ?: '[]', true);
$this->assertIsArray($rows);
foreach ($rows as $row) {
$this->assertArrayHasKey('module', $row);
$this->assertArrayHasKey('canonical_status', $row);
$this->assertArrayHasKey('risk', $row);
}
}
}