Skip to content

Commit

Permalink
[Contracts][HttpClient] Skip tests when zlib's ob_gzhandler() doesn…
Browse files Browse the repository at this point in the history
…'t exist
  • Loading branch information
alexandre-daubois committed Jul 9, 2024
1 parent 87ca825 commit 1663725
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Tests/HttplugClientTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ public static function tearDownAfterClass(): void
TestHttpServer::stop();
}

/**
* @requires function ob_gzhandler
*/
public function testSendRequest()
{
$client = new HttplugClient(new NativeHttpClient());
Expand All @@ -51,6 +54,9 @@ public function testSendRequest()
$this->assertSame('HTTP/1.1', $body['SERVER_PROTOCOL']);
}

/**
* @requires function ob_gzhandler
*/
public function testSendAsyncRequest()
{
$client = new HttplugClient(new NativeHttpClient());
Expand Down
3 changes: 3 additions & 0 deletions Tests/Psr18ClientTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ public static function tearDownAfterClass(): void
TestHttpServer::stop();
}

/**
* @requires function ob_gzhandler
*/
public function testSendRequest()
{
$factory = new Psr17Factory();
Expand Down

0 comments on commit 1663725

Please sign in to comment.