Rework registry to combine provider and registry interface, move capabilities out and enable Registry injection in Builder (#150)

This commit is contained in:
Christopher Hertel 2025-11-20 19:36:57 +01:00 • committed by GitHub
commit 7cd281d0c7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -13,7 +13,7 @@ namespace Mcp\Tests\Unit\Server\Handler\Request;
use Mcp\Capability\Registry\PromptReference;
use Mcp\Capability\Registry\ReferenceHandlerInterface;
use Mcp\Capability\Registry\ReferenceProviderInterface;
use Mcp\Capability\RegistryInterface;
use Mcp\Exception\PromptGetException;
use Mcp\Exception\PromptNotFoundException;
use Mcp\Schema\Content\PromptMessage;
@ -31,13 +31,13 @@ use PHPUnit\Framework\TestCase;
class GetPromptHandlerTest extends TestCase
{
private GetPromptHandler $handler;
private ReferenceProviderInterface&MockObject $referenceProvider;
private RegistryInterface&MockObject $referenceProvider;
private ReferenceHandlerInterface&MockObject $referenceHandler;
private SessionInterface&MockObject $session;
protected function setUp(): void
{
$this->referenceProvider = $this->createMock(ReferenceProviderInterface::class);
$this->referenceProvider = $this->createMock(RegistryInterface::class);
$this->referenceHandler = $this->createMock(ReferenceHandlerInterface::class);
$this->session = $this->createMock(SessionInterface::class);