summaryrefslogtreecommitdiff
path: root/ext/curl/tests
diff options
context:
space:
mode:
authorJavier Spagnoletti <phansys@gmail.com>2019-04-30 14:12:39 -0300
committerNikita Popov <nikita.ppv@gmail.com>2019-05-02 15:11:42 +0200
commit6b73e692c976bdfdc710741cd983a9b33c13b3e7 (patch)
tree6f06770a52373453acee126ab25bef25dc29175c /ext/curl/tests
parentd91b643c87cb6ff91ee1792ef430bfb92bf00581 (diff)
downloadphp-git-6b73e692c976bdfdc710741cd983a9b33c13b3e7.tar.gz
Add more missing CURL_VERSION_* constants
And also check for CURL_VERSION_* constants in the sync-constants.php script. Related to request #72189: Add missing `CURL_VERSION_*` constants.
Diffstat (limited to 'ext/curl/tests')
-rw-r--r--ext/curl/tests/bug72189.phpt49
1 files changed, 49 insertions, 0 deletions
diff --git a/ext/curl/tests/bug72189.phpt b/ext/curl/tests/bug72189.phpt
new file mode 100644
index 0000000000..6723c2aae6
--- /dev/null
+++ b/ext/curl/tests/bug72189.phpt
@@ -0,0 +1,49 @@
+--TEST--
+Request #72189 (Add missing CURL_VERSION_* constants)
+--SKIPIF--
+<?php
+
+include 'skipif.inc';
+
+$version = curl_version();
+
+if ($version['version_number'] < 0x071306) {
+ exit('skip: test works only with curl >= 7.19.6');
+}
+
+?>
+--FILE--
+<?php
+
+$version = curl_version();
+
+$bitfields = [
+ CURL_VERSION_ASYNCHDNS,
+ CURL_VERSION_CONV,
+ CURL_VERSION_CURLDEBUG,
+ CURL_VERSION_DEBUG,
+ CURL_VERSION_GSSNEGOTIATE,
+ CURL_VERSION_IDN,
+ CURL_VERSION_IPV6,
+ CURL_VERSION_KERBEROS4,
+ CURL_VERSION_LARGEFILE,
+ CURL_VERSION_LIBZ,
+ CURL_VERSION_NTLM,
+ CURL_VERSION_SPNEGO,
+ CURL_VERSION_SSL,
+ CURL_VERSION_SSPI,
+];
+
+$matchesCount = 0;
+
+foreach ($bitfields as $feature) {
+ if ($version['features'] & $feature) {
+ ++$matchesCount;
+ }
+}
+
+var_dump($matchesCount > 0);
+
+?>
+--EXPECT--
+bool(true)