feat: Divi hints point to the read tools; guides divi-structure/attrs/design-system; test: Divi read end-to-end
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01At3V6SjwbMe6eMzVGW3Hs7
This commit is contained in:
@@ -45,6 +45,22 @@ final class InstructionsBuilderTest extends TestCase
|
||||
self::assertLessThan(2000, strlen($text), 'Instructions must stay short – they are loaded in every conversation.');
|
||||
}
|
||||
|
||||
public function testAddsTheDiviRuleOnlyWhenDiviIsActive(): void
|
||||
{
|
||||
$divi = Mockery::mock(Integration::class);
|
||||
$divi->allows('id')->andReturn('divi');
|
||||
$divi->allows('isAvailable')->andReturn(true);
|
||||
$divi->allows('abilities')->andReturn([$this->ability('lit/divi-outline', true)]);
|
||||
$core = $this->coreWith($this->ability('lit/guide', true));
|
||||
|
||||
$with = (new InstructionsBuilder(new IntegrationRegistry($core, $divi)))->build();
|
||||
$without = (new InstructionsBuilder(new IntegrationRegistry($core)))->build();
|
||||
|
||||
self::assertStringContainsString('lit-divi-outline und lit-divi-design-system lesen', $with);
|
||||
self::assertStringNotContainsString('lit-divi-outline und', $without);
|
||||
self::assertLessThan(2000, strlen($with));
|
||||
}
|
||||
|
||||
public function testListsPostTypesWhenAProviderIsGiven(): void
|
||||
{
|
||||
$core = $this->coreWith($this->ability('lit/guide', true));
|
||||
|
||||
Reference in New Issue
Block a user