forked from fa/breadcrumb-the-shire
Module pages must use a unique top-level directory (audit/) instead of nesting under admin/ which collides with core's pages/admin/ during module:build symlink creation. Routes still map admin/* URLs to the audit/ page directory via manifest route targets. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
21 lines
879 B
PHP
21 lines
879 B
PHP
<?php
|
|
|
|
namespace MintyPHP\Tests\Architecture;
|
|
|
|
use PHPUnit\Framework\TestCase;
|
|
|
|
final class StatusTaxonomyUiContractTest extends TestCase
|
|
{
|
|
use ProjectFileAssertionSupport;
|
|
|
|
public function testImportAuditIndexTemplateDoesNotUseLegacyStatusMapper(): void
|
|
{
|
|
$content = $this->readProjectFile('modules/audit/pages/audit/import-audit/index(default).phtml');
|
|
$moduleContent = $this->readProjectFile('modules/audit/web/js/pages/admin-import-audit-index.js');
|
|
$this->assertStringNotContainsString('const statusLabel = (value) =>', $moduleContent);
|
|
$this->assertStringNotContainsString("if (key === 'running')", $moduleContent);
|
|
$this->assertStringContainsString('cell.label || \'-\'', $moduleContent);
|
|
$this->assertStringContainsString("assetVersion('modules/audit/js/pages/admin-import-audit-index.js')", $content);
|
|
}
|
|
}
|