Files
WP-LIT-MCP/tests/Support/FakeCapability.php
T
Jan-Niclas LoosenandClaude Opus 5.5 c85131603b feat(compat): Profile, Gates und Pods über den Kompatibilitätskern
Neu: Tier, Profile, Compatibility, CapabilityLocked, CapabilityGate, CompatibilityComponent, ProvidesCompatibility, DiviProfile sowie PodsFeature, PodsCompatibility und PodsIntegration. Das CapabilityGate sperrt gesperrte und unbekannte Fähigkeits-IDs (übernimmt die Sperre unbekannter IDs vom DiviFeatureGate) und delegiert nur Divi ausdrücklich. Pods-Schema, -Lesen, -Schreiben und -Feldrechte laufen über usable(PodsFeature::…); Schreiben verlangt FieldRead und FieldWrite, damit ein Rollback keine Werte verliert. lit-site-status meldet Pods über die CompatibilityComponent.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-06 12:26:54 +01:00

34 lines
810 B
PHP

<?php
declare(strict_types=1);
namespace LIT\MCP\Tests\Support;
use LIT\MCP\Compatibility\Capability;
// The installed PHPCompatibility sniffs predate enums (PHP 8.1) and read their methods as plain functions.
// phpcs:disable PHPCompatibility.Variables.ForbiddenThisUseContexts.OutsideObjectContext
/** Capabilities of an invented plugin, for the tests of the compatibility core (which knows no real one). */
enum FakeCapability: string implements Capability
{
case Read = 'fake-read';
case Write = 'fake-write';
case Other = 'fake-other';
public function id(): string
{
return $this->value;
}
public function label(): string
{
return 'Fake ' . $this->value;
}
public function isWrite(): bool
{
return $this === self::Write;
}
}