From 65e3ff66c7f7d6b927f15ff7307152f06daacf2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joan=20Fabr=C3=A9gat?= Date: Tue, 10 Dec 2024 10:05:08 -0800 Subject: [PATCH] `checkServiceHealth` is renamed `isHealthy` --- src/Pdf2ImgClient.php | 2 +- tests/Pdf2ImgClientTest.php | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Pdf2ImgClient.php b/src/Pdf2ImgClient.php index 625e8ff..bf871f1 100644 --- a/src/Pdf2ImgClient.php +++ b/src/Pdf2ImgClient.php @@ -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( diff --git a/tests/Pdf2ImgClientTest.php b/tests/Pdf2ImgClientTest.php index 2fc21a4..20ff533 100644 --- a/tests/Pdf2ImgClientTest.php +++ b/tests/Pdf2ImgClientTest.php @@ -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."); } /**