Skip to content
This repository has been archived by the owner on Dec 11, 2024. It is now read-only.

Commit

Permalink
checkServiceHealth is renamed isHealthy
Browse files Browse the repository at this point in the history
  • Loading branch information
joanfabregat committed Dec 10, 2024
1 parent 3c37314 commit 65e3ff6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Pdf2ImgClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ private function getEndpointUri(string $endpoint): string
*
* @return bool Health check response, expected to be "ok".
*/
public function checkServiceHealth(): bool
public function isHealthy(): bool
{
try {
$response = $this->client->sendRequest(
Expand Down
6 changes: 3 additions & 3 deletions tests/Pdf2ImgClientTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@ public function testHealth(): void
{
// testing a healthy service
$client = $this->getNewClient();
$this->assertNotFalse($client->checkServiceHealth(), "The service is not healthy.");
$this->assertNotFalse($client->isHealthy(), "The service is not healthy.");

// testing a non-existing service
$client = new Pdf2ImgClient('https://example.com');
$this->assertFalse($client->checkServiceHealth(), "The service is healthy.");
$this->assertFalse($client->isHealthy(), "The service is healthy.");

// testing a non-existing url
$client = new Pdf2ImgClient('https://example-NQrkB6F6MwuXesMrBhqx.com');
$this->assertFalse($client->checkServiceHealth(), "The service is healthy.");
$this->assertFalse($client->isHealthy(), "The service is healthy.");
}

/**
Expand Down

0 comments on commit 65e3ff6

Please sign in to comment.