Skip to content

Commit

Permalink
Merge pull request #294 from tienvx/test-stub-server-health-check
Browse files Browse the repository at this point in the history
Test stub server health check
  • Loading branch information
YOU54F committed Apr 28, 2023
2 parents afc6f22 + 1244962 commit 4cbc3db
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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.');
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 4cbc3db

Please sign in to comment.