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

Commit

Permalink
Update WatermarkerClientTest.php
Browse files Browse the repository at this point in the history
  • Loading branch information
joanfabregat committed Dec 6, 2024
1 parent 3581784 commit c365eb5
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion tests/WatermarkerClientTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,22 @@ final class WatermarkerClientTest extends TestCase
private const string DEFAULT_WATERMARKER_BASE_URL = 'http://localhost:3000';
private const string TEST_IMG_PATH = __DIR__.'/assets/doc.png';
private const string TEST_WATERMARK_PATH = __DIR__.'/assets/watermark.png';
private const string TEST_RESULT_PATH = __DIR__.'/assets/watermarked.jpg';
private const string TEST_RESULT_PATH = '/tmp/watermarked.jpg';

public function testHealth(): void
{
// testing a healthy service
$client = $this->getNewClient();
$this->assertNotFalse($client->checkServiceHealth(), "The service is not healthy.");

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

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

/**
* @throws Exception
Expand Down

0 comments on commit c365eb5

Please sign in to comment.