[ 'blockName' => $block->name(), 'innerBlocks' => $convert($block->children()), ], $blocks); }; return static fn (string $content): array => $convert((new Parser())->parse($content)->children()); } public function testTheShippedReferenceRoundTripsAndMatchesWordPress(): void { self::assertSame([], (new FormatCheck(null, self::wordPress()))->problems()); self::assertFileEquals( dirname(__DIR__, 5) . '/tests/Fixtures/divi/converted-landing.html', FormatCheck::REFERENCE ); } public function testADifferentStructureInWordPressIsReported(): void { $check = new FormatCheck(null, static fn (): array => [['blockName' => 'divi/section', 'innerBlocks' => []]]); self::assertSame(['WordPress liest eine andere Blockstruktur als LIT MCP.'], $check->problems()); } public function testAMissingReferenceIsReported(): void { self::assertSame( ['Der Referenzinhalt der Prüfung fehlt im Plugin.'], (new FormatCheck('/nonexistent/reference.html', self::wordPress()))->problems() ); } }