From: Michael Wallner Date: Wed, 25 May 2016 11:58:25 +0000 (+0200) Subject: be more verbose about nghttp2 skip X-Git-Tag: RELEASE_3_1_0_BETA1~15 X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=commitdiff_plain;h=1eaeb2c133a2e47327fe6cd6282db2a02527e57a;hp=9f18b5395f9c937105d698ce564920dc06dce8f5;ds=sidebyside be more verbose about nghttp2 skip --- diff --git a/tests/skipif.inc b/tests/skipif.inc index 770cf5d..4844def 100644 --- a/tests/skipif.inc +++ b/tests/skipif.inc @@ -20,14 +20,17 @@ function skip_client_test($message = "skip need a client driver\n") { } } -function skip_http2_test($message = "skip need http2 support (nghttpd in PATH)\n") { - if (defined("http\\Client\\Curl\\HTTP_VERSION_2_0") - && (http\Client\Curl\FEATURES & http\Client\Curl\Features\HTTP2)) { - foreach (explode(":", $_ENV["PATH"]) as $path) { - if (is_executable($path . "/nghttpd")) { - return; - } +function skip_http2_test($message = "skip need http2 support") { + if (!defined("http\\Client\\Curl\\HTTP_VERSION_2_0")) { + die("$message (HTTP_VERSION_2_0)\n"); + } + if (!(http\Client\Curl\FEATURES & http\Client\Curl\Features\HTTP2)) { + die("$message (FEATURES & HTTP2)\n"); + } + foreach (explode(":", $_ENV["PATH"]) as $path) { + if (is_executable($path . "/nghttpd")) { + return; } } - die($message); + die("$message (nghttpd in PATH)\n"); } \ No newline at end of file