|
47 | 47 | expect($codex->mcpConfigKey())->toBe('mcp_servers'); |
48 | 48 | }); |
49 | 49 |
|
50 | | -test('builds MCP server config with cwd field', function (): void { |
| 50 | +test('builds MCP server config without cwd by default', function (): void { |
51 | 51 | $codex = new Codex($this->strategyFactory); |
52 | 52 |
|
53 | 53 | $config = $codex->mcpServerConfig('php', ['artisan', 'boost:mcp']); |
54 | 54 |
|
55 | 55 | expect($config)->toHaveKey('command', 'php') |
56 | 56 | ->toHaveKey('args', ['artisan', 'boost:mcp']) |
57 | | - ->toHaveKey('cwd', base_path()); |
| 57 | + ->not->toHaveKey('cwd'); |
58 | 58 | }); |
59 | 59 |
|
60 | 60 | test('builds MCP server config with config "boost.executable_paths.current_directory" override', function (): void { |
|
76 | 76 |
|
77 | 77 | expect($config)->toHaveKey('command', 'php') |
78 | 78 | ->toHaveKey('args', ['artisan']) |
79 | | - ->toHaveKey('cwd') |
| 79 | + ->not->toHaveKey('cwd') |
80 | 80 | ->toHaveKey('env', ['APP_ENV' => 'local']); |
81 | 81 | }); |
82 | 82 |
|
|
86 | 86 | $config = $codex->mcpServerConfig('php', [], []); |
87 | 87 |
|
88 | 88 | expect($config)->toHaveKey('command', 'php') |
89 | | - ->toHaveKey('cwd') |
| 89 | + ->not->toHaveKey('cwd') |
90 | 90 | ->not->toHaveKey('args') |
91 | 91 | ->not->toHaveKey('env'); |
92 | 92 | }); |
|
170 | 170 | ->and($capturedContent)->toContain('[mcp_servers.laravel_boost]') |
171 | 171 | ->and($capturedContent)->toContain('command = "php"') |
172 | 172 | ->and($capturedContent)->toContain('args = ["artisan", "boost:mcp"]') |
173 | | - ->and($capturedContent)->toContain('cwd = '); |
| 173 | + ->and($capturedContent)->not->toContain('cwd = '); |
174 | 174 | }); |
0 commit comments