Skip to content

Commit 3590bec

Browse files
ashleyhindlegithub-actions[bot]
authored andcommitted
Fix code styling
1 parent 8aae29e commit 3590bec

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

tests/Feature/Mcp/ToolExecutorTest.php

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<?php
22

33
use Laravel\Boost\Mcp\ToolExecutor;
4-
use Laravel\Boost\Mcp\Tools\ApplicationInfo;
54
use Laravel\Boost\Mcp\Tools\GetConfig;
65
use Laravel\Boost\Mcp\Tools\Tinker;
76
use Laravel\Mcp\Server\Tools\ToolResult;
@@ -136,36 +135,36 @@ function buildSubprocessCommand(string $toolClass, array $arguments): array
136135
test('respects custom timeout parameter', function () {
137136
$executor = Mockery::mock(ToolExecutor::class)->makePartial()
138137
->shouldAllowMockingProtectedMethods();
139-
138+
140139
$executor->shouldReceive('buildCommand')
141140
->andReturnUsing(fn ($toolClass, $arguments) => buildSubprocessCommand($toolClass, $arguments));
142141

143142
// Test with custom timeout - should succeed with fast code
144143
$result = $executor->execute(Tinker::class, [
145144
'code' => 'return "timeout test";',
146-
'timeout' => 30
145+
'timeout' => 30,
147146
]);
148147

149148
expect($result->isError)->toBeFalse();
150149
});
151150

152151
test('clamps timeout values correctly', function () {
153152
$executor = new ToolExecutor();
154-
153+
155154
// Test timeout clamping using reflection to access protected method
156155
$reflection = new ReflectionClass($executor);
157156
$method = $reflection->getMethod('getTimeout');
158157
$method->setAccessible(true);
159-
158+
160159
// Test default
161160
expect($method->invoke($executor, []))->toBe(180);
162-
161+
163162
// Test custom value
164163
expect($method->invoke($executor, ['timeout' => 60]))->toBe(60);
165-
164+
166165
// Test minimum clamp
167166
expect($method->invoke($executor, ['timeout' => 0]))->toBe(1);
168-
167+
169168
// Test maximum clamp
170169
expect($method->invoke($executor, ['timeout' => 1000]))->toBe(600);
171170
});

0 commit comments

Comments
 (0)