refactor: Kern ohne Divi – Ports BuilderDetector, MediaUsageSource, EnvironmentComponent und ausgeschlossene Post-Typen im ContentSchema; Divi-Implementierungen und Verdrahtung über DiviIntegration/Plugin; CoreIndependenceTest
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5.5
parent
abeb4b0eed
commit
06148fb8c1
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace LIT\MCP\Tests\Support;
|
||||
|
||||
use LIT\MCP\Integrations\WordPress\BuilderDetector;
|
||||
|
||||
/** A BuilderDetector for tests: fixed availability and a fixed set of builder layouts. */
|
||||
final class FakeBuilderDetector implements BuilderDetector
|
||||
{
|
||||
/** @param list<int> $layouts IDs of the posts the builder flag marks. */
|
||||
public function __construct(private bool $available = true, private array $layouts = [])
|
||||
{
|
||||
}
|
||||
|
||||
public function isAvailable(): bool
|
||||
{
|
||||
return $this->available;
|
||||
}
|
||||
|
||||
public function usesBuilder(int $postId): bool
|
||||
{
|
||||
return in_array($postId, $this->layouts, true);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user