Skip to content

Commit d7119f0

Browse files
committed
Avoid broken inspector cli version by pinning
1 parent 41486bf commit d7119f0

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

tests/Inspector/InspectorSnapshotTestCase.php

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,20 @@
1717

1818
abstract class InspectorSnapshotTestCase extends TestCase
1919
{
20+
private const INSPECTOR_VERSION = '0.16.8';
21+
2022
#[DataProvider('provideMethods')]
2123
public function testResourcesListOutputMatchesSnapshot(string $method): void
2224
{
23-
$process = Process::fromShellCommandline(
24-
\sprintf('npx @modelcontextprotocol/inspector --cli php %s --method %s', $this->getServerScript(), $method)
25-
)->mustRun();
25+
$process = (new Process([
26+
'npx',
27+
\sprintf('@modelcontextprotocol/inspector@%s', self::INSPECTOR_VERSION),
28+
'--cli',
29+
'php',
30+
$this->getServerScript(),
31+
'--method',
32+
$method,
33+
]))->mustRun();
2634

2735
$output = $process->getOutput();
2836
$snapshotFile = $this->getSnapshotFilePath($method);

0 commit comments

Comments
 (0)