allows('id')->andReturn('core'); $core->allows('isAvailable')->andReturn(true); $text = (new InstructionsBuilder(new IntegrationRegistry($core)))->build(); self::assertStringContainsString('Aktive Integrationen: core', $text); self::assertStringContainsString('lit-guide', $text); self::assertStringContainsString('Status', $text); self::assertLessThan(2000, strlen($text), 'Instructions must stay short – they are loaded in every conversation.'); } public function testListsPostTypesWhenAProviderIsGiven(): void { $core = Mockery::mock(Integration::class); $core->allows('id')->andReturn('core'); $core->allows('isAvailable')->andReturn(true); $text = (new InstructionsBuilder(new IntegrationRegistry($core), static fn (): array => ['page', 'post']))->build(); self::assertStringContainsString('Inhaltstypen: page, post', $text); self::assertStringContainsString('lit-content-types', $text); self::assertStringContainsString('confirm: true', $text); } }