Skip to content

Commit a8923fd

Browse files
klapaudiusgithub-actions[bot]
authored andcommitted
Fix styling
1 parent b9434c8 commit a8923fd

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

tests/Protocol/MCPProtocolTest.php

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ public function test_connect_sends_messages(): void
142142
/**
143143
* Test that handleMessage handles invalid JSON-RPC messages by sending an error response
144144
*/
145-
public function test_handleMessage_handles_invalid_jsonrpc(): void
145+
public function test_handle_message_handles_invalid_jsonrpc(): void
146146
{
147147
$clientId = 'client_1';
148148
$invalidMessage = ['id' => 1, 'method' => 'example.method'];
@@ -156,6 +156,7 @@ public function test_handleMessage_handles_invalid_jsonrpc(): void
156156
$this->assertEquals('2.0', $response['jsonrpc']);
157157
$this->assertEquals(-32600, $response['error']['code']);
158158
$this->assertEquals('Invalid Request: Not a valid JSON-RPC 2.0 message', $response['error']['message']);
159+
159160
return true;
160161
})
161162
);
@@ -166,7 +167,7 @@ public function test_handleMessage_handles_invalid_jsonrpc(): void
166167
/**
167168
* Test that handleMessage processes valid request messages and sends results using the transport
168169
*/
169-
public function test_handleMessage_handles_valid_request(): void
170+
public function test_handle_message_handles_valid_request(): void
170171
{
171172
$clientId = 'client_1';
172173
$validRequestMessage = ['jsonrpc' => '2.0', 'id' => 1, 'method' => 'test.method', 'params' => ['param1' => 'value1']];
@@ -185,6 +186,7 @@ public function test_handleMessage_handles_valid_request(): void
185186
$this->assertEquals('2.0', $response['jsonrpc']);
186187
$this->assertEquals(1, $response['id']);
187188
$this->assertEquals(['response' => 'ok'], $response['result']);
189+
188190
return true;
189191
})
190192
);
@@ -195,7 +197,7 @@ public function test_handleMessage_handles_valid_request(): void
195197
/**
196198
* Test that handleMessage processes valid notification messages without sending a response
197199
*/
198-
public function test_handleMessage_handles_valid_notification(): void
200+
public function test_handle_message_handles_valid_notification(): void
199201
{
200202
$clientId = 'client_1';
201203
$validNotificationMessage = ['jsonrpc' => '2.0', 'method' => 'notify.method', 'params' => ['param1' => 'value1']];
@@ -215,7 +217,7 @@ public function test_handleMessage_handles_valid_notification(): void
215217
/**
216218
* Test that handleMessage responds with an error for unknown methods in requests
217219
*/
218-
public function test_handleMessage_handles_unknown_method(): void
220+
public function test_handle_message_handles_unknown_method(): void
219221
{
220222
$clientId = 'client_1';
221223
$unknownRequestMessage = ['jsonrpc' => '2.0', 'id' => 1, 'method' => 'unknown.method'];
@@ -230,6 +232,7 @@ public function test_handleMessage_handles_unknown_method(): void
230232
$this->assertEquals(1, $data['id']);
231233
$this->assertEquals(-32601, $data['error']['code']);
232234
$this->assertEquals('Method not found: unknown.method', $data['error']['message']);
235+
233236
return true;
234237
}));
235238

@@ -239,7 +242,7 @@ public function test_handleMessage_handles_unknown_method(): void
239242
/**
240243
* Test that handleMessage responds with an error for unknown notification in requests
241244
*/
242-
public function test_handleMessage_handles_unknown_notification(): void
245+
public function test_handle_message_handles_unknown_notification(): void
243246
{
244247
$clientId = 'client_1';
245248
$unknownNotificationMessage = ['jsonrpc' => '2.0', 'method' => 'unknown.notify'];
@@ -253,6 +256,7 @@ public function test_handleMessage_handles_unknown_notification(): void
253256
$this->assertEquals('2.0', $data['jsonrpc']);
254257
$this->assertEquals(-32601, $data['error']['code']);
255258
$this->assertEquals('Method not found: unknown.notify', $data['error']['message']);
259+
256260
return true;
257261
}));
258262

0 commit comments

Comments
 (0)