Skip to content

Commit 266df73

Browse files
fix: explicitly provide discovery directory in tests
1 parent 31590b5 commit 266df73

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

config/mcp.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
*/
3030
'discovery' => [
3131
'base_path' => base_path(),
32-
'directories' => array_filter(explode(',', env('MCP_DISCOVERY_PATH', 'app/Mcp'))),
32+
'directories' => array_filter(explode(',', env('MCP_DISCOVERY_DIRECTORIES', 'app/Mcp'))),
3333
'exclude_dirs' => [
3434
'vendor',
3535
'tests',

phpunit.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
<env name="MCP_SERVER_NAME" value="Test MCP Laravel Server"/>
2929
<env name="MCP_SERVER_VERSION" value="0.1-test"/>
3030
<env name="MCP_AUTO_DISCOVER" value="true"/>
31-
<env name="MCP_DISCOVERY_PATH" value="App/Mcp"/>
31+
<env name="MCP_DISCOVERY_DIRECTORIES" value="App/Mcp"/>
3232
<env name="MCP_CACHE_STORE" value="array"/>
3333
<env name="MCP_CACHE_TTL" value="3600"/>
3434
<env name="MCP_HTTP_INTEGRATED_ENABLED" value="true"/>

tests/TestCase.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace PhpMcp\Laravel\Tests;
44

5+
use Illuminate\Config\Repository as ConfigRepository;
56
use Orchestra\Testbench\TestCase as OrchestraTestCase;
67
use PhpMcp\Laravel\McpServiceProvider;
78

@@ -27,9 +28,8 @@ protected function defineEnvironment($app): void
2728
$this->definitionsFilePath = __DIR__ . '/Stubs/routes/mcp-definitions.php';
2829

2930
$app['config']->set('mcp.discovery.definitions_file', $this->definitionsFilePath);
31+
$app['config']->set('mcp.discovery.directories', ['App/Mcp']);
3032
$app['config']->set('mcp.discovery.base_path', __DIR__ . '/Stubs');
31-
32-
$app['config']->set('mcp.logging.channel', 'null');
3333
}
3434

3535
/**

0 commit comments

Comments
 (0)