refactor: transport agnostic examples (#131)
This commit is contained in:
parent
fb3c1e65a6
commit
ff26b4ff61
11 changed files with 157 additions and 289 deletions
|
|
@ -59,6 +59,6 @@ final class HttpClientCommunicationTest extends HttpInspectorSnapshotTestCase
|
|||
|
||||
protected function getServerScript(): string
|
||||
{
|
||||
return \dirname(__DIR__, 3).'/examples/http-client-communication/server.php';
|
||||
return \dirname(__DIR__, 3).'/examples/client-communication/server.php';
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -45,6 +45,6 @@ final class HttpCombinedRegistrationTest extends HttpInspectorSnapshotTestCase
|
|||
|
||||
protected function getServerScript(): string
|
||||
{
|
||||
return \dirname(__DIR__, 3).'/examples/http-combined-registration/server.php';
|
||||
return \dirname(__DIR__, 3).'/examples/combined-registration/server.php';
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -82,6 +82,6 @@ final class HttpComplexToolSchemaTest extends HttpInspectorSnapshotTestCase
|
|||
|
||||
protected function getServerScript(): string
|
||||
{
|
||||
return \dirname(__DIR__, 3).'/examples/http-complex-tool-schema/server.php';
|
||||
return \dirname(__DIR__, 3).'/examples/complex-tool-schema/server.php';
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -67,6 +67,6 @@ final class HttpDiscoveryUserProfileTest extends HttpInspectorSnapshotTestCase
|
|||
|
||||
protected function getServerScript(): string
|
||||
{
|
||||
return \dirname(__DIR__, 3).'/examples/http-discovery-userprofile/server.php';
|
||||
return \dirname(__DIR__, 3).'/examples/discovery-userprofile/server.php';
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,14 +21,12 @@ abstract class HttpInspectorSnapshotTestCase extends InspectorSnapshotTestCase
|
|||
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
$this->startServer();
|
||||
}
|
||||
|
||||
protected function tearDown(): void
|
||||
{
|
||||
$this->stopServer();
|
||||
parent::tearDown();
|
||||
}
|
||||
|
||||
abstract protected function getServerScript(): string;
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ final class HttpSchemaShowcaseTest extends HttpInspectorSnapshotTestCase
|
|||
|
||||
protected function getServerScript(): string
|
||||
{
|
||||
return \dirname(__DIR__, 3).'/examples/http-schema-showcase/server.php';
|
||||
return \dirname(__DIR__, 3).'/examples/schema-showcase/server.php';
|
||||
}
|
||||
|
||||
protected function normalizeTestOutput(string $output, ?string $testName = null): string
|
||||
|
|
|
|||
|
|
@ -88,6 +88,6 @@ final class StdioCachedDiscoveryTest extends StdioInspectorSnapshotTestCase
|
|||
|
||||
protected function getServerScript(): string
|
||||
{
|
||||
return \dirname(__DIR__, 3).'/examples/stdio-cached-discovery/server.php';
|
||||
return \dirname(__DIR__, 3).'/examples/cached-discovery/server.php';
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ final class StdioCustomDependenciesTest extends StdioInspectorSnapshotTestCase
|
|||
|
||||
protected function getServerScript(): string
|
||||
{
|
||||
return \dirname(__DIR__, 3).'/examples/stdio-custom-dependencies/server.php';
|
||||
return \dirname(__DIR__, 3).'/examples/custom-dependencies/server.php';
|
||||
}
|
||||
|
||||
protected function normalizeTestOutput(string $output, ?string $testName = null): string
|
||||
|
|
|
|||
|
|
@ -45,6 +45,6 @@ final class StdioDiscoveryCalculatorTest extends StdioInspectorSnapshotTestCase
|
|||
|
||||
protected function getServerScript(): string
|
||||
{
|
||||
return \dirname(__DIR__, 3).'/examples/stdio-discovery-calculator/server.php';
|
||||
return \dirname(__DIR__, 3).'/examples/discovery-calculator/server.php';
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -50,6 +50,6 @@ final class StdioEnvVariablesTest extends StdioInspectorSnapshotTestCase
|
|||
|
||||
protected function getServerScript(): string
|
||||
{
|
||||
return \dirname(__DIR__, 3).'/examples/stdio-env-variables/server.php';
|
||||
return \dirname(__DIR__, 3).'/examples/env-variables/server.php';
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -77,6 +77,6 @@ final class StdioExplicitRegistrationTest extends StdioInspectorSnapshotTestCase
|
|||
|
||||
protected function getServerScript(): string
|
||||
{
|
||||
return \dirname(__DIR__, 3).'/examples/stdio-explicit-registration/server.php';
|
||||
return \dirname(__DIR__, 3).'/examples/explicit-registration/server.php';
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue