feat: admin check steps with throwaway write test and reports

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-09-30 02:21:09 +02:00
co-authored by Claude Opus 5.5
parent c6a1996be6
commit 47040aa43d
14 changed files with 1026 additions and 26 deletions
@@ -0,0 +1,31 @@
<?php
declare(strict_types=1);
namespace LIT\MCP\Tests\Unit\Integrations\Divi\Schema;
use LIT\MCP\Integrations\Divi\Schema\ModuleCatalog;
use LIT\MCP\Integrations\Divi\Schema\ShortformCheck;
use LIT\MCP\Integrations\Divi\Schema\ShortformMap;
use LIT\MCP\Tests\Support\DiviFixtures;
use PHPUnit\Framework\TestCase;
final class ShortformCheckTest extends TestCase
{
public function testAnEmptyCatalogKnowsNoShortformModule(): void
{
$problems = ShortformCheck::problems(new ModuleCatalog([]));
self::assertCount(count(ShortformMap::types()), $problems);
self::assertContains('divi/text: unbekanntes Modul', $problems);
}
/** The fixture catalog (metadata-sample.json) lacks some modules, but every path of the modules it has is right. */
public function testFixtureCatalogHasNoWrongPathsOrChildren(): void
{
foreach (ShortformCheck::problems(DiviFixtures::catalog()) as $problem) {
self::assertStringEndsWith(': unbekanntes Modul', $problem);
}
self::assertNotContains('divi/text: unbekanntes Modul', ShortformCheck::problems(DiviFixtures::catalog()));
}
}