Avoid broken inspector cli version by pinning (#98)
This commit is contained in:
parent
345b94dfbb
commit
f0807f149e
1 changed files with 11 additions and 3 deletions
|
|
@ -17,12 +17,20 @@ use Symfony\Component\Process\Process;
|
|||
|
||||
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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue