From 1663725502cab59a51c9f3e452eee144b52f4eb9 Mon Sep 17 00:00:00 2001 From: Alexandre Daubois Date: Tue, 9 Jul 2024 14:08:44 +0200 Subject: [PATCH] [Contracts][HttpClient] Skip tests when zlib's `ob_gzhandler()` doesn't exist --- Tests/HttplugClientTest.php | 6 ++++++ Tests/Psr18ClientTest.php | 3 +++ 2 files changed, 9 insertions(+) diff --git a/Tests/HttplugClientTest.php b/Tests/HttplugClientTest.php index 0e62425..41ed55e 100644 --- a/Tests/HttplugClientTest.php +++ b/Tests/HttplugClientTest.php @@ -37,6 +37,9 @@ public static function tearDownAfterClass(): void TestHttpServer::stop(); } + /** + * @requires function ob_gzhandler + */ public function testSendRequest() { $client = new HttplugClient(new NativeHttpClient()); @@ -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()); diff --git a/Tests/Psr18ClientTest.php b/Tests/Psr18ClientTest.php index d1f4deb..65b7f5b 100644 --- a/Tests/Psr18ClientTest.php +++ b/Tests/Psr18ClientTest.php @@ -33,6 +33,9 @@ public static function tearDownAfterClass(): void TestHttpServer::stop(); } + /** + * @requires function ob_gzhandler + */ public function testSendRequest() { $factory = new Psr17Factory();