From d7119f0d073654ade53a0ad1fe7772ec48fa871c Mon Sep 17 00:00:00 2001 From: Christopher Hertel Date: Mon, 6 Oct 2025 22:56:10 +0200 Subject: [PATCH] Avoid broken inspector cli version by pinning --- tests/Inspector/InspectorSnapshotTestCase.php | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/tests/Inspector/InspectorSnapshotTestCase.php b/tests/Inspector/InspectorSnapshotTestCase.php index bca8179..9b8c219 100644 --- a/tests/Inspector/InspectorSnapshotTestCase.php +++ b/tests/Inspector/InspectorSnapshotTestCase.php @@ -17,12 +17,20 @@ abstract class InspectorSnapshotTestCase extends TestCase { + private const INSPECTOR_VERSION = '0.16.8'; + #[DataProvider('provideMethods')] public function testResourcesListOutputMatchesSnapshot(string $method): void { - $process = Process::fromShellCommandline( - \sprintf('npx @modelcontextprotocol/inspector --cli php %s --method %s', $this->getServerScript(), $method) - )->mustRun(); + $process = (new Process([ + 'npx', + \sprintf('@modelcontextprotocol/inspector@%s', self::INSPECTOR_VERSION), + '--cli', + 'php', + $this->getServerScript(), + '--method', + $method, + ]))->mustRun(); $output = $process->getOutput(); $snapshotFile = $this->getSnapshotFilePath($method);