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:
@@ -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()));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user