refactor: transport agnostic examples (#131)

This commit is contained in:
Christopher Hertel 2025-11-02 18:07:43 +01:00 • committed by GitHub
commit ff26b4ff61
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 157 additions and 289 deletions

View file

@ -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';
}
}

View file

@ -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';
}
}

View file

@ -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';
}
}

View file

@ -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';
}
}

View file

@ -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;

View file

@ -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