Ruling Q8 caps the unused scan at 20 candidates per call (not the brief's 500/50), and each result (search and unused alike) is filtered to attachments the current user may edit; overview.md lists media-search as a direct tool (ruling Q2). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01At3V6SjwbMe6eMzVGW3Hs7
36 lines
1.1 KiB
PHP
36 lines
1.1 KiB
PHP
<?php
|
||
|
||
declare(strict_types=1);
|
||
|
||
namespace LIT\MCP\Tests\Unit\Integrations\Media;
|
||
|
||
use LIT\MCP\Abilities\Ability;
|
||
use LIT\MCP\ChangeLog\ChangeLog;
|
||
use LIT\MCP\Integrations\Media\MediaIntegration;
|
||
use LIT\MCP\Integrations\WordPress\Schema\ContentSchema;
|
||
use LIT\MCP\Limits;
|
||
use LIT\MCP\Tests\Unit\TestCase;
|
||
use Mockery;
|
||
|
||
final class MediaIntegrationTest extends TestCase
|
||
{
|
||
/** Grows with Tasks 2–5 – keep in the order of abilities(). */
|
||
private const EXPECTED = [
|
||
'lit/media-search',
|
||
'lit/media-get',
|
||
];
|
||
|
||
public function testProvidesTheMediaAbilities(): void
|
||
{
|
||
$integration = new MediaIntegration(Mockery::mock(ContentSchema::class), Mockery::mock(ChangeLog::class), new Limits());
|
||
|
||
self::assertSame('media', $integration->id());
|
||
self::assertTrue($integration->isAvailable());
|
||
self::assertSame(self::EXPECTED, array_map(static fn (Ability $a): string => $a->name(), $integration->abilities()));
|
||
|
||
foreach ($integration->abilities() as $ability) {
|
||
self::assertFalse($ability->inputSchema()['additionalProperties'], $ability->name());
|
||
}
|
||
}
|
||
}
|