<?php

namespace MintyPHP\Tests\Architecture;

use PHPUnit\Framework\TestCase;

final class DetailPageRuntimeContractTest extends TestCase
{
    use ProjectFileAssertionSupport;

    public function testAppInitIncludesStandardDetailPageAutoInitComponent(): void
    {
        $content = $this->readProjectFile('web/js/app-init.js');

        $this->assertStringContainsString(
            "import { initStandardDetailPages } from './components/app-standard-detail-page.js';",
            $content
        );
        $this->assertStringContainsString("runtime.register('standard-detail-page', initStandardDetailPages", $content);
    }
}
