feat: DiviFeatureGate ersetzt DiviToolGate – Ablehnung je Fähigkeit für Lese- und Schreib-Tools, Details nach D6, kein Hinweis mehr in warnings; DiviContentComposer::refusal prüft seine Fähigkeiten
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5.5
parent
fdbda8012c
commit
74cf0c54a8
@@ -10,6 +10,8 @@ use LIT\MCP\Integrations\Divi\Pages\DiviContentComposer;
|
||||
use LIT\MCP\Integrations\Divi\Pages\DiviSaver;
|
||||
use LIT\MCP\Integrations\Divi\Pages\DynamicContentMap;
|
||||
use LIT\MCP\Integrations\Divi\Release\DiviFeature;
|
||||
use LIT\MCP\Integrations\Divi\Release\ReleaseState;
|
||||
use LIT\MCP\Tests\Support\DiviFeatureFixtures;
|
||||
use LIT\MCP\Tests\Support\DiviFixtures;
|
||||
use LIT\MCP\Tests\Support\DiviWriterFixture;
|
||||
use LIT\MCP\Tests\Unit\TestCase;
|
||||
@@ -80,6 +82,30 @@ final class DiviContentComposerTest extends TestCase
|
||||
}
|
||||
}
|
||||
|
||||
public function testRefusesNothingWhileItsCapabilitiesAreUsable(): void
|
||||
{
|
||||
DiviFeatureFixtures::useStates([
|
||||
'preset-write' => ReleaseState::Incompatible,
|
||||
'library-write' => ReleaseState::Untested,
|
||||
'tb-write' => ReleaseState::Incompatible,
|
||||
]);
|
||||
|
||||
self::assertNull($this->composer()->refusal(), 'capabilities of other tools do not matter');
|
||||
}
|
||||
|
||||
public function testRefusesWithTheLockedCapabilitiesOfANewEntry(): void
|
||||
{
|
||||
DiviFeatureFixtures::useStates([
|
||||
'page-write' => ReleaseState::Untested,
|
||||
'dynamic-sources' => ReleaseState::Incompatible,
|
||||
'preset-write' => ReleaseState::Untested,
|
||||
]);
|
||||
|
||||
$payload = self::assertToolError($this->composer()->refusal(), 'divi_incompatible');
|
||||
|
||||
self::assertSame(['page-write', 'dynamic-sources'], array_column($payload['features'], 'id'));
|
||||
}
|
||||
|
||||
public function testChecksBeforeTheEntryExistsWithDivisMapForNoEntry(): void
|
||||
{
|
||||
self::assertNull($this->composer()->check('page', self::sections()));
|
||||
|
||||
Reference in New Issue
Block a user