test: shared Divi fixtures in tests/Support (T1)
- DiviFixtures: markup(), givenPost(), schema(), designSystem(), catalog(), dynamicContentRegistry(), maliciousRefs() - moved verbatim out of DiviPageLoaderTest, DesignSystemTest, ModuleCatalogTest, DynamicContentMapTest and VariableRefTest (its malicious() provider now returns maliciousRefs()). - ComposeFixture moves to tests/Support. - DiviWriterFixture: modules(), designReader(), composition(), a recording saver(), log() and writer(&$saved, &$failures, unfiltered, loader) for the five tests that wired the Divi write stack by hand. No test cases or assertions changed (1397 / 5834). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -5,6 +5,8 @@ declare(strict_types=1);
|
||||
namespace LIT\MCP\Tests\Unit\Integrations\Divi\Compose;
|
||||
|
||||
use InvalidArgumentException;
|
||||
use LIT\MCP\Tests\Support\ComposeFixture;
|
||||
use LIT\MCP\Tests\Support\DiviFixtures;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
final class ShortformWriterTest extends TestCase
|
||||
@@ -146,7 +148,7 @@ final class ShortformWriterTest extends TestCase
|
||||
public static function malicious(): array
|
||||
{
|
||||
$rows = [];
|
||||
foreach (VariableRefTest::malicious() as $name => [$value]) {
|
||||
foreach (DiviFixtures::maliciousRefs() as $name => [$value]) {
|
||||
foreach (array_keys(self::TARGETS) as $kind) {
|
||||
$rows[$kind . ': ' . $name] = [$kind, $value, $kind !== 'text'];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user