diff --git a/.github/workflows/pipeline.yaml b/.github/workflows/pipeline.yaml index 98e173a3..d7fd0de1 100644 --- a/.github/workflows/pipeline.yaml +++ b/.github/workflows/pipeline.yaml @@ -6,7 +6,7 @@ permissions: pull-requests: write jobs: - tests: + unit: runs-on: ubuntu-latest strategy: matrix: @@ -22,16 +22,36 @@ jobs: php-version: ${{ matrix.php }} coverage: "none" - - name: Composer Validation - run: composer validate --strict - - name: Install Composer uses: "ramsey/composer-install@v3" with: dependency-versions: "${{ matrix.dependencies }}" - name: Tests - run: vendor/bin/phpunit --exclude-group inspector + run: vendor/bin/phpunit --testsuite=unit + + inspector: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v5 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: '8.4' + coverage: "none" + + - name: Setup Node + uses: actions/setup-node@v5 + with: + node-version: '22' + + - name: Install Composer + uses: "ramsey/composer-install@v3" + + - name: Tests + run: vendor/bin/phpunit --testsuite=inspector qa: runs-on: ubuntu-latest diff --git a/.gitignore b/.gitignore index 825fe72f..dda65497 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ .phpunit.cache .php-cs-fixer.cache composer.lock +coverage vendor examples/**/dev.log examples/**/sessions diff --git a/Makefile b/Makefile index 12e4f321..119e9d40 100644 --- a/Makefile +++ b/Makefile @@ -15,8 +15,14 @@ phpstan: tests: vendor/bin/phpunit +unit-tests: + vendor/bin/phpunit --testsuite=unit + +inspector-tests: + vendor/bin/phpunit --testsuite=inspector + coverage: - XDEBUG_MODE=coverage vendor/bin/phpunit --coverage-html=coverage + XDEBUG_MODE=coverage vendor/bin/phpunit --testsuite=unit --coverage-html=coverage ci: ci-stable diff --git a/phpstan.dist.neon b/phpstan.dist.neon index 108b384b..17f4c3b0 100644 --- a/phpstan.dist.neon +++ b/phpstan.dist.neon @@ -9,8 +9,8 @@ parameters: - tests/ excludePaths: - examples/cli/vendor/* (?) - - tests/Capability/Discovery/Fixtures/ - - tests/Capability/Discovery/SchemaGeneratorFixture.php + - tests/Unit/Capability/Discovery/Fixtures/ + - tests/Unit/Capability/Discovery/SchemaGeneratorFixture.php treatPhpDocTypesAsCertain: false ignoreErrors: - diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 1dfe524e..d5adf9e1 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -9,8 +9,11 @@ failOnWarning="true"> - - tests + + tests/Unit + + + tests/Inspector diff --git a/tests/Example/InspectorSnapshotTestCase.php b/tests/Inspector/InspectorSnapshotTestCase.php similarity index 98% rename from tests/Example/InspectorSnapshotTestCase.php rename to tests/Inspector/InspectorSnapshotTestCase.php index fae80d51..bca8179f 100644 --- a/tests/Example/InspectorSnapshotTestCase.php +++ b/tests/Inspector/InspectorSnapshotTestCase.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Mcp\Tests\Example; +namespace Mcp\Tests\Inspector; use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; diff --git a/tests/Inspector/ManualStdioExampleTest.php b/tests/Inspector/ManualStdioExampleTest.php new file mode 100644 index 00000000..affe4462 --- /dev/null +++ b/tests/Inspector/ManualStdioExampleTest.php @@ -0,0 +1,29 @@ +expectException(InvalidArgumentException::class); - $this->expectExceptionMessage('Invokable handler class "Mcp\\Tests\\Capability\\Discovery\\NonInvokableClass" must have a public "__invoke" method.'); + $this->expectExceptionMessage('Invokable handler class "Mcp\Tests\Unit\Capability\Discovery\NonInvokableClass" must have a public "__invoke" method.'); HandlerResolver::resolve(NonInvokableClass::class); } @@ -129,7 +129,7 @@ public function testThrowsForDestructorAsHandler() public function testThrowsForAbstractMethodHandler() { $this->expectException(InvalidArgumentException::class); - $this->expectExceptionMessage('Handler method "Mcp\Tests\Capability\Discovery\AbstractHandlerClass::abstractMethod" must be abstract.'); + $this->expectExceptionMessage('Handler method "Mcp\Tests\Unit\Capability\Discovery\AbstractHandlerClass::abstractMethod" must be abstract.'); HandlerResolver::resolve([AbstractHandlerClass::class, 'abstractMethod']); } diff --git a/tests/Capability/Discovery/SchemaGeneratorFixture.php b/tests/Unit/Capability/Discovery/SchemaGeneratorFixture.php similarity index 98% rename from tests/Capability/Discovery/SchemaGeneratorFixture.php rename to tests/Unit/Capability/Discovery/SchemaGeneratorFixture.php index 736487ed..5a7fcaeb 100644 --- a/tests/Capability/Discovery/SchemaGeneratorFixture.php +++ b/tests/Unit/Capability/Discovery/SchemaGeneratorFixture.php @@ -9,12 +9,12 @@ * file that was distributed with this source code. */ -namespace Mcp\Tests\Capability\Discovery; +namespace Mcp\Tests\Unit\Capability\Discovery; use Mcp\Capability\Attribute\Schema; -use Mcp\Tests\Fixtures\Enum\BackedIntEnum; -use Mcp\Tests\Fixtures\Enum\BackedStringEnum; -use Mcp\Tests\Fixtures\Enum\UnitEnum; +use Mcp\Tests\Unit\Fixtures\Enum\BackedIntEnum; +use Mcp\Tests\Unit\Fixtures\Enum\BackedStringEnum; +use Mcp\Tests\Unit\Fixtures\Enum\UnitEnum; /** * Comprehensive fixture for testing SchemaGenerator with various scenarios. diff --git a/tests/Capability/Discovery/SchemaGeneratorTest.php b/tests/Unit/Capability/Discovery/SchemaGeneratorTest.php similarity index 99% rename from tests/Capability/Discovery/SchemaGeneratorTest.php rename to tests/Unit/Capability/Discovery/SchemaGeneratorTest.php index 19fb2288..4cbfce52 100644 --- a/tests/Capability/Discovery/SchemaGeneratorTest.php +++ b/tests/Unit/Capability/Discovery/SchemaGeneratorTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Mcp\Tests\Capability\Discovery; +namespace Mcp\Tests\Unit\Capability\Discovery; use Mcp\Capability\Discovery\DocBlockParser; use Mcp\Capability\Discovery\SchemaGenerator; diff --git a/tests/Capability/Discovery/SchemaValidatorTest.php b/tests/Unit/Capability/Discovery/SchemaValidatorTest.php similarity index 99% rename from tests/Capability/Discovery/SchemaValidatorTest.php rename to tests/Unit/Capability/Discovery/SchemaValidatorTest.php index b1c8a705..417ddbde 100644 --- a/tests/Capability/Discovery/SchemaValidatorTest.php +++ b/tests/Unit/Capability/Discovery/SchemaValidatorTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Mcp\Tests\Capability\Discovery; +namespace Mcp\Tests\Unit\Capability\Discovery; use Mcp\Capability\Attribute\Schema; use Mcp\Capability\Discovery\SchemaValidator; diff --git a/tests/Capability/Prompt/Completion/EnumCompletionProviderTest.php b/tests/Unit/Capability/Prompt/Completion/EnumCompletionProviderTest.php similarity index 92% rename from tests/Capability/Prompt/Completion/EnumCompletionProviderTest.php rename to tests/Unit/Capability/Prompt/Completion/EnumCompletionProviderTest.php index 7d568f3c..8d81d0e6 100644 --- a/tests/Capability/Prompt/Completion/EnumCompletionProviderTest.php +++ b/tests/Unit/Capability/Prompt/Completion/EnumCompletionProviderTest.php @@ -9,13 +9,13 @@ * file that was distributed with this source code. */ -namespace Mcp\Tests\Capability\Prompt\Completion; +namespace Mcp\Tests\Unit\Capability\Prompt\Completion; use Mcp\Capability\Prompt\Completion\EnumCompletionProvider; use Mcp\Exception\InvalidArgumentException; -use Mcp\Tests\Fixtures\Enum\PriorityEnum; -use Mcp\Tests\Fixtures\Enum\StatusEnum; -use Mcp\Tests\Fixtures\Enum\UnitEnum; +use Mcp\Tests\Unit\Fixtures\Enum\PriorityEnum; +use Mcp\Tests\Unit\Fixtures\Enum\StatusEnum; +use Mcp\Tests\Unit\Fixtures\Enum\UnitEnum; use PHPUnit\Framework\TestCase; class EnumCompletionProviderTest extends TestCase diff --git a/tests/Capability/Prompt/Completion/ListCompletionProviderTest.php b/tests/Unit/Capability/Prompt/Completion/ListCompletionProviderTest.php similarity index 97% rename from tests/Capability/Prompt/Completion/ListCompletionProviderTest.php rename to tests/Unit/Capability/Prompt/Completion/ListCompletionProviderTest.php index b5def78d..80c58100 100644 --- a/tests/Capability/Prompt/Completion/ListCompletionProviderTest.php +++ b/tests/Unit/Capability/Prompt/Completion/ListCompletionProviderTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Mcp\Tests\Capability\Prompt\Completion; +namespace Mcp\Tests\Unit\Capability\Prompt\Completion; use Mcp\Capability\Prompt\Completion\ListCompletionProvider; use PHPUnit\Framework\TestCase; diff --git a/tests/Capability/Prompt/PromptGetterTest.php b/tests/Unit/Capability/Prompt/PromptGetterTest.php similarity index 99% rename from tests/Capability/Prompt/PromptGetterTest.php rename to tests/Unit/Capability/Prompt/PromptGetterTest.php index 46bee1cf..fe68ddcb 100644 --- a/tests/Capability/Prompt/PromptGetterTest.php +++ b/tests/Unit/Capability/Prompt/PromptGetterTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Mcp\Tests\Capability\Prompt; +namespace Mcp\Tests\Unit\Capability\Prompt; use Mcp\Capability\Prompt\Completion\EnumCompletionProvider; use Mcp\Capability\Prompt\PromptGetter; diff --git a/tests/Capability/Registry/RegistryProviderTest.php b/tests/Unit/Capability/Registry/RegistryProviderTest.php similarity index 99% rename from tests/Capability/Registry/RegistryProviderTest.php rename to tests/Unit/Capability/Registry/RegistryProviderTest.php index 604311be..b1eaa857 100644 --- a/tests/Capability/Registry/RegistryProviderTest.php +++ b/tests/Unit/Capability/Registry/RegistryProviderTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Mcp\Tests\Capability\Registry; +namespace Mcp\Tests\Unit\Capability\Registry; use Mcp\Capability\Registry; use Mcp\Capability\Registry\PromptReference; diff --git a/tests/Capability/Registry/RegistryTest.php b/tests/Unit/Capability/Registry/RegistryTest.php similarity index 99% rename from tests/Capability/Registry/RegistryTest.php rename to tests/Unit/Capability/Registry/RegistryTest.php index 14548b63..91ce0f71 100644 --- a/tests/Capability/Registry/RegistryTest.php +++ b/tests/Unit/Capability/Registry/RegistryTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Mcp\Tests\Capability\Registry; +namespace Mcp\Tests\Unit\Capability\Registry; use Mcp\Capability\Prompt\Completion\EnumCompletionProvider; use Mcp\Capability\Registry; diff --git a/tests/Capability/Resource/ResourceReaderTest.php b/tests/Unit/Capability/Resource/ResourceReaderTest.php similarity index 99% rename from tests/Capability/Resource/ResourceReaderTest.php rename to tests/Unit/Capability/Resource/ResourceReaderTest.php index 2206ce92..73c967ff 100644 --- a/tests/Capability/Resource/ResourceReaderTest.php +++ b/tests/Unit/Capability/Resource/ResourceReaderTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Mcp\Tests\Capability\Resource; +namespace Mcp\Tests\Unit\Capability\Resource; use Mcp\Capability\Registry\ReferenceHandlerInterface; use Mcp\Capability\Registry\ReferenceProviderInterface; diff --git a/tests/Capability/Tool/ToolCallerTest.php b/tests/Unit/Capability/Tool/ToolCallerTest.php similarity index 99% rename from tests/Capability/Tool/ToolCallerTest.php rename to tests/Unit/Capability/Tool/ToolCallerTest.php index 8894dc93..889c2ec4 100644 --- a/tests/Capability/Tool/ToolCallerTest.php +++ b/tests/Unit/Capability/Tool/ToolCallerTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Mcp\Tests\Capability\Tool; +namespace Mcp\Tests\Unit\Capability\Tool; use Mcp\Capability\Registry\ReferenceHandlerInterface; use Mcp\Capability\Registry\ReferenceProviderInterface; diff --git a/tests/Fixtures/Enum/BackedIntEnum.php b/tests/Unit/Fixtures/Enum/BackedIntEnum.php similarity index 89% rename from tests/Fixtures/Enum/BackedIntEnum.php rename to tests/Unit/Fixtures/Enum/BackedIntEnum.php index 32fa8ca8..75079c77 100644 --- a/tests/Fixtures/Enum/BackedIntEnum.php +++ b/tests/Unit/Fixtures/Enum/BackedIntEnum.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Mcp\Tests\Fixtures\Enum; +namespace Mcp\Tests\Unit\Fixtures\Enum; enum BackedIntEnum: int { diff --git a/tests/Fixtures/Enum/BackedStringEnum.php b/tests/Unit/Fixtures/Enum/BackedStringEnum.php similarity index 89% rename from tests/Fixtures/Enum/BackedStringEnum.php rename to tests/Unit/Fixtures/Enum/BackedStringEnum.php index ae5cbcaa..85961949 100644 --- a/tests/Fixtures/Enum/BackedStringEnum.php +++ b/tests/Unit/Fixtures/Enum/BackedStringEnum.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Mcp\Tests\Fixtures\Enum; +namespace Mcp\Tests\Unit\Fixtures\Enum; enum BackedStringEnum: string { diff --git a/tests/Fixtures/Enum/PriorityEnum.php b/tests/Unit/Fixtures/Enum/PriorityEnum.php similarity index 89% rename from tests/Fixtures/Enum/PriorityEnum.php rename to tests/Unit/Fixtures/Enum/PriorityEnum.php index 5bf466e6..2d3c3706 100644 --- a/tests/Fixtures/Enum/PriorityEnum.php +++ b/tests/Unit/Fixtures/Enum/PriorityEnum.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Mcp\Tests\Fixtures\Enum; +namespace Mcp\Tests\Unit\Fixtures\Enum; enum PriorityEnum: int { diff --git a/tests/Fixtures/Enum/StatusEnum.php b/tests/Unit/Fixtures/Enum/StatusEnum.php similarity index 90% rename from tests/Fixtures/Enum/StatusEnum.php rename to tests/Unit/Fixtures/Enum/StatusEnum.php index 66bfce32..0387d44a 100644 --- a/tests/Fixtures/Enum/StatusEnum.php +++ b/tests/Unit/Fixtures/Enum/StatusEnum.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Mcp\Tests\Fixtures\Enum; +namespace Mcp\Tests\Unit\Fixtures\Enum; enum StatusEnum: string { diff --git a/tests/Fixtures/Enum/UnitEnum.php b/tests/Unit/Fixtures/Enum/UnitEnum.php similarity index 88% rename from tests/Fixtures/Enum/UnitEnum.php rename to tests/Unit/Fixtures/Enum/UnitEnum.php index a751e12c..65947683 100644 --- a/tests/Fixtures/Enum/UnitEnum.php +++ b/tests/Unit/Fixtures/Enum/UnitEnum.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Mcp\Tests\Fixtures\Enum; +namespace Mcp\Tests\Unit\Fixtures\Enum; enum UnitEnum { diff --git a/tests/JsonRpc/HandlerTest.php b/tests/Unit/JsonRpc/HandlerTest.php similarity index 99% rename from tests/JsonRpc/HandlerTest.php rename to tests/Unit/JsonRpc/HandlerTest.php index 20781def..2535449a 100644 --- a/tests/JsonRpc/HandlerTest.php +++ b/tests/Unit/JsonRpc/HandlerTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Mcp\Tests\JsonRpc; +namespace Mcp\Tests\Unit\JsonRpc; use Mcp\JsonRpc\Handler; use Mcp\JsonRpc\MessageFactory; diff --git a/tests/JsonRpc/MessageFactoryTest.php b/tests/Unit/JsonRpc/MessageFactoryTest.php similarity index 98% rename from tests/JsonRpc/MessageFactoryTest.php rename to tests/Unit/JsonRpc/MessageFactoryTest.php index 9f43aad6..12d2b233 100644 --- a/tests/JsonRpc/MessageFactoryTest.php +++ b/tests/Unit/JsonRpc/MessageFactoryTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Mcp\Tests\JsonRpc; +namespace Mcp\Tests\Unit\JsonRpc; use Mcp\Exception\InvalidInputMessageException; use Mcp\JsonRpc\MessageFactory; diff --git a/tests/Schema/JsonRpc/NotificationTest.php b/tests/Unit/Schema/JsonRpc/NotificationTest.php similarity index 97% rename from tests/Schema/JsonRpc/NotificationTest.php rename to tests/Unit/Schema/JsonRpc/NotificationTest.php index c2ab0fe5..af98671c 100644 --- a/tests/Schema/JsonRpc/NotificationTest.php +++ b/tests/Unit/Schema/JsonRpc/NotificationTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Mcp\Tests\Schema\JsonRpc; +namespace Mcp\Tests\Unit\Schema\JsonRpc; use Mcp\Schema\JsonRpc\Notification; use PHPUnit\Framework\TestCase; diff --git a/tests/Schema/JsonRpc/RequestTest.php b/tests/Unit/Schema/JsonRpc/RequestTest.php similarity index 97% rename from tests/Schema/JsonRpc/RequestTest.php rename to tests/Unit/Schema/JsonRpc/RequestTest.php index 279d0953..86e01d3d 100644 --- a/tests/Schema/JsonRpc/RequestTest.php +++ b/tests/Unit/Schema/JsonRpc/RequestTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Mcp\Tests\Schema\JsonRpc; +namespace Mcp\Tests\Unit\Schema\JsonRpc; use Mcp\Schema\JsonRpc\Request; use PHPUnit\Framework\TestCase; diff --git a/tests/Schema/ServerCapabilitiesTest.php b/tests/Unit/Schema/ServerCapabilitiesTest.php similarity index 99% rename from tests/Schema/ServerCapabilitiesTest.php rename to tests/Unit/Schema/ServerCapabilitiesTest.php index 3a9f2b99..9d1562c1 100644 --- a/tests/Schema/ServerCapabilitiesTest.php +++ b/tests/Unit/Schema/ServerCapabilitiesTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Mcp\Tests\Schema; +namespace Mcp\Tests\Unit\Schema; use Mcp\Schema\ServerCapabilities; use PHPUnit\Framework\TestCase; diff --git a/tests/Server/RequestHandler/CallToolHandlerTest.php b/tests/Unit/Server/RequestHandler/CallToolHandlerTest.php similarity index 99% rename from tests/Server/RequestHandler/CallToolHandlerTest.php rename to tests/Unit/Server/RequestHandler/CallToolHandlerTest.php index 1b2187ff..ea0b8c17 100644 --- a/tests/Server/RequestHandler/CallToolHandlerTest.php +++ b/tests/Unit/Server/RequestHandler/CallToolHandlerTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Mcp\Tests\Server\RequestHandler; +namespace Mcp\Tests\Unit\Server\RequestHandler; use Mcp\Capability\Tool\ToolCallerInterface; use Mcp\Exception\ToolCallException; diff --git a/tests/Server/RequestHandler/GetPromptHandlerTest.php b/tests/Unit/Server/RequestHandler/GetPromptHandlerTest.php similarity index 99% rename from tests/Server/RequestHandler/GetPromptHandlerTest.php rename to tests/Unit/Server/RequestHandler/GetPromptHandlerTest.php index 120b0e08..e941ef41 100644 --- a/tests/Server/RequestHandler/GetPromptHandlerTest.php +++ b/tests/Unit/Server/RequestHandler/GetPromptHandlerTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Mcp\Tests\Server\RequestHandler; +namespace Mcp\Tests\Unit\Server\RequestHandler; use Mcp\Capability\Prompt\PromptGetterInterface; use Mcp\Exception\PromptGetException; diff --git a/tests/Server/RequestHandler/ListPromptsHandlerTest.php b/tests/Unit/Server/RequestHandler/ListPromptsHandlerTest.php similarity index 99% rename from tests/Server/RequestHandler/ListPromptsHandlerTest.php rename to tests/Unit/Server/RequestHandler/ListPromptsHandlerTest.php index b10d3e56..c3079e2d 100644 --- a/tests/Server/RequestHandler/ListPromptsHandlerTest.php +++ b/tests/Unit/Server/RequestHandler/ListPromptsHandlerTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Mcp\Tests\Server\RequestHandler; +namespace Mcp\Tests\Unit\Server\RequestHandler; use Mcp\Capability\Registry; use Mcp\Exception\InvalidCursorException; diff --git a/tests/Server/RequestHandler/ListResourcesHandlerTest.php b/tests/Unit/Server/RequestHandler/ListResourcesHandlerTest.php similarity index 99% rename from tests/Server/RequestHandler/ListResourcesHandlerTest.php rename to tests/Unit/Server/RequestHandler/ListResourcesHandlerTest.php index 13044a73..f1b6a6ca 100644 --- a/tests/Server/RequestHandler/ListResourcesHandlerTest.php +++ b/tests/Unit/Server/RequestHandler/ListResourcesHandlerTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Mcp\Tests\Server\RequestHandler; +namespace Mcp\Tests\Unit\Server\RequestHandler; use Mcp\Capability\Registry; use Mcp\Exception\InvalidCursorException; diff --git a/tests/Server/RequestHandler/ListToolsHandlerTest.php b/tests/Unit/Server/RequestHandler/ListToolsHandlerTest.php similarity index 99% rename from tests/Server/RequestHandler/ListToolsHandlerTest.php rename to tests/Unit/Server/RequestHandler/ListToolsHandlerTest.php index 85ae9b63..a7e4902c 100644 --- a/tests/Server/RequestHandler/ListToolsHandlerTest.php +++ b/tests/Unit/Server/RequestHandler/ListToolsHandlerTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Mcp\Tests\Server\RequestHandler; +namespace Mcp\Tests\Unit\Server\RequestHandler; use Mcp\Capability\Registry; use Mcp\Exception\InvalidCursorException; diff --git a/tests/Server/RequestHandler/PingHandlerTest.php b/tests/Unit/Server/RequestHandler/PingHandlerTest.php similarity index 99% rename from tests/Server/RequestHandler/PingHandlerTest.php rename to tests/Unit/Server/RequestHandler/PingHandlerTest.php index 3be1176b..6c75e74a 100644 --- a/tests/Server/RequestHandler/PingHandlerTest.php +++ b/tests/Unit/Server/RequestHandler/PingHandlerTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Mcp\Tests\Server\RequestHandler; +namespace Mcp\Tests\Unit\Server\RequestHandler; use Mcp\Schema\JsonRpc\Request; use Mcp\Schema\JsonRpc\Response; diff --git a/tests/Server/RequestHandler/ReadResourceHandlerTest.php b/tests/Unit/Server/RequestHandler/ReadResourceHandlerTest.php similarity index 99% rename from tests/Server/RequestHandler/ReadResourceHandlerTest.php rename to tests/Unit/Server/RequestHandler/ReadResourceHandlerTest.php index a78aa853..ab6c8fb3 100644 --- a/tests/Server/RequestHandler/ReadResourceHandlerTest.php +++ b/tests/Unit/Server/RequestHandler/ReadResourceHandlerTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Mcp\Tests\Server\RequestHandler; +namespace Mcp\Tests\Unit\Server\RequestHandler; use Mcp\Capability\Resource\ResourceReaderInterface; use Mcp\Exception\ResourceNotFoundException; diff --git a/tests/ServerTest.php b/tests/Unit/ServerTest.php similarity index 98% rename from tests/ServerTest.php rename to tests/Unit/ServerTest.php index 046583d1..34c04efc 100644 --- a/tests/ServerTest.php +++ b/tests/Unit/ServerTest.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Mcp\Tests; +namespace Mcp\Tests\Unit; use Mcp\JsonRpc\Handler; use Mcp\Server;