diff --git a/src/PhpPact/Standalone/StubService/Service/StubServerHttpService.php b/src/PhpPact/Standalone/StubService/Service/StubServerHttpService.php index b3b98fed..66790d0f 100644 --- a/src/PhpPact/Standalone/StubService/Service/StubServerHttpService.php +++ b/src/PhpPact/Standalone/StubService/Service/StubServerHttpService.php @@ -53,7 +53,7 @@ public function healthCheck(): bool $body = $response->getBody()->getContents(); if ($response->getStatusCode() !== 200 - || $body !== "Stub service running\n") { + || $body !== "Mock service running\n") { throw new ConnectionException('Failed to receive a successful response from the Stub Server.'); } diff --git a/tests/PhpPact/Standalone/StubServer/Service/StubServerHttpServiceTest.php b/tests/PhpPact/Standalone/StubServer/Service/StubServerHttpServiceTest.php index bc580efa..2990bd58 100644 --- a/tests/PhpPact/Standalone/StubServer/Service/StubServerHttpServiceTest.php +++ b/tests/PhpPact/Standalone/StubServer/Service/StubServerHttpServiceTest.php @@ -49,6 +49,12 @@ protected function tearDown(): void $this->stubServer->stop(); } + public function testHealthCheck() + { + $result = $this->service->healthCheck(); + $this->assertTrue($result); + } + public function testGetJson() { $result = $this->service->getJson();