fix tests for master
authorMichael Wallner <mike@php.net>
Wed, 25 May 2016 10:06:57 +0000 (12:06 +0200)
committerMichael Wallner <mike@php.net>
Wed, 25 May 2016 10:06:57 +0000 (12:06 +0200)
tests/client008.phpt
tests/etag001.phpt
tests/skipif.inc

index 98fc8f8aebc34d9da458bbf1a252a10f208b8e83..3f5641fdf040dd1d8ca9e1e8a15e9cf42444bccc 100644 (file)
@@ -1,5 +1,5 @@
 --TEST--
-client features
+client configuration
 --SKIPIF--
 <?php
 include "skipif.inc";
index e23bd0a0e8a687bedce79ee6586ecb587181a4e9..e5e3d4a84cc97d56a0891029f530be1e01e7c197 100644 (file)
@@ -10,7 +10,7 @@ _ext("hash");
 $body = new http\Message\Body;
 $body->append("Hello, my old fellow.");
 foreach (hash_algos() as $algo) {
-    if (strncmp($algo, "sha3-", 5)) {
+    if (strncmp($algo, "sha3-", 5) && strncmp($algo, "sha512/", 7)) {
         ini_set("http.etag.mode", $algo);
         printf("%10s: %s\n",
             $algo,
index 4ab631e63d5b9b00b2e1be2c3efe174bfc3791bb..770cf5d32acb9d769d9bf23693fc584270a858c8 100644 (file)
@@ -21,7 +21,8 @@ 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")) {
+       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;