forked from modelcontextprotocol/php-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHttpDiscoveryUserProfileTest.php
More file actions
72 lines (68 loc) · 2.36 KB
/
HttpDiscoveryUserProfileTest.php
File metadata and controls
72 lines (68 loc) · 2.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<?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 HttpDiscoveryUserProfileTest extends HttpInspectorSnapshotTestCase
{
public static function provideMethods(): array
{
return [
...parent::provideMethods(),
'Send Welcome Tool' => [
'method' => 'tools/call',
'options' => [
'toolName' => 'send_welcome',
'toolArgs' => ['userId' => '"101"', 'customMessage' => 'Welcome to our platform!'],
],
'testName' => 'send_welcome',
],
'Test Tool Without Params' => [
'method' => 'tools/call',
'options' => [
'toolName' => 'test_tool_without_params',
'toolArgs' => [],
],
'testName' => 'test_tool_without_params',
],
'Read User Profile 101' => [
'method' => 'resources/read',
'options' => [
'uri' => 'user://101/profile',
],
'testName' => 'read_user_profile_101',
],
'Read User Profile 102' => [
'method' => 'resources/read',
'options' => [
'uri' => 'user://102/profile',
],
'testName' => 'read_user_profile_102',
],
'Read User ID List' => [
'method' => 'resources/read',
'options' => [
'uri' => 'user://list/ids',
],
'testName' => 'read_user_id_list',
],
'Generate Bio Prompt (Formal)' => [
'method' => 'prompts/get',
'options' => [
'promptName' => 'generate_bio_prompt',
'promptArgs' => ['userId' => '101', 'tone' => 'formal'],
],
'testName' => 'generate_bio_prompt',
],
];
}
protected function getServerScript(): string
{
return \dirname(__DIR__, 3).'/examples/server/discovery-userprofile/server.php';
}
}