diff --git a/src/PhpPact/Standalone/StubService/Service/StubServerHttpService.php b/src/PhpPact/Standalone/StubService/Service/StubServerHttpService.php index a96cfdd97..592e6e181 100644 --- a/src/PhpPact/Standalone/StubService/Service/StubServerHttpService.php +++ b/src/PhpPact/Standalone/StubService/Service/StubServerHttpService.php @@ -2,7 +2,6 @@ namespace PhpPact\Standalone\StubService\Service; -use PhpPact\Exception\ConnectionException; use PhpPact\Http\ClientInterface; use PhpPact\Standalone\StubService\StubServerConfigInterface; @@ -36,30 +35,6 @@ public function __construct(ClientInterface $client, StubServerConfigInterface $ $this->config = $config; } - /** - * {@inheritdoc} - */ - public function healthCheck(): bool - { - $uri = $this->config->getBaseUri()->withPath('/'); - - $response = $this->client->get($uri, [ - 'headers' => [ - 'Content-Type' => 'application/json', - 'X-Pact-Mock-Service' => true, - ], - ]); - - $body = $response->getBody()->getContents(); - - if ($response->getStatusCode() !== 200 - || $body !== "Stub service running\n") { - throw new ConnectionException('Failed to receive a successful response from the Stub Server.'); - } - - return true; - } - /** * {@inheritdoc} */ diff --git a/src/PhpPact/Standalone/StubService/Service/StubServerHttpServiceInterface.php b/src/PhpPact/Standalone/StubService/Service/StubServerHttpServiceInterface.php index 2b8679afc..f0ba6b54f 100644 --- a/src/PhpPact/Standalone/StubService/Service/StubServerHttpServiceInterface.php +++ b/src/PhpPact/Standalone/StubService/Service/StubServerHttpServiceInterface.php @@ -2,22 +2,11 @@ namespace PhpPact\Standalone\StubService\Service; -use PhpPact\Exception\ConnectionException; - /** * Interface StubServerHttpServiceInterface. */ interface StubServerHttpServiceInterface { - /** - * Verify that the Ruby PhpPact Stub Server is running. - * - * @throws ConnectionException - * - * @return bool - */ - public function healthCheck(): bool; - /** * Get the current state of the PACT JSON file and write it to disk. *