[Server] Feat: Add comprehensive HTTP inspector tests with improved framework (#125)
* feat: add comprehensive HTTP inspector tests and improve test framework * chore: remove debug flag from server configuration
This commit is contained in:
parent
ca18caf29d
commit
757b959bfd
1 changed files with 1877 additions and 189 deletions
50
tests/Inspector/Http/HttpCombinedRegistrationTest.php
Normal file
50
tests/Inspector/Http/HttpCombinedRegistrationTest.php
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the official PHP MCP SDK.
|
||||
*
|
||||
* A collaboration between Symfony and the PHP Foundation.
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Mcp\Tests\Inspector\Http;
|
||||
|
||||
final class HttpCombinedRegistrationTest extends HttpInspectorSnapshotTestCase
|
||||
{
|
||||
public static function provideMethods(): array
|
||||
{
|
||||
return [
|
||||
...parent::provideMethods(),
|
||||
'Manual Greeter Tool' => [
|
||||
'method' => 'tools/call',
|
||||
'options' => [
|
||||
'toolName' => 'manualGreeter',
|
||||
'toolArgs' => ['user' => 'HTTP Test User'],
|
||||
],
|
||||
'testName' => 'manual_greeter',
|
||||
],
|
||||
'Discovered Status Check Tool' => [
|
||||
'method' => 'tools/call',
|
||||
'options' => [
|
||||
'toolName' => 'discovered_status_check',
|
||||
'toolArgs' => [],
|
||||
],
|
||||
'testName' => 'discovered_status_check',
|
||||
],
|
||||
'Read Priority Config (Manual Override)' => [
|
||||
'method' => 'resources/read',
|
||||
'options' => [
|
||||
'uri' => 'config://priority',
|
||||
],
|
||||
'testName' => 'config_priority',
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
protected function getServerScript(): string
|
||||
{
|
||||
return \dirname(__DIR__, 3).'/examples/http-combined-registration/server.php';
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue