summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorPierrick Charron <pierrick@php.net>2012-12-26 00:43:37 -0500
committerPierrick Charron <pierrick@php.net>2012-12-26 00:43:37 -0500
commit8456cef1dbcb6c5a5690ce4553063ad18874f0b1 (patch)
tree5cb8f6730a119b063f9d5b0ab1fd3921835aaf6b /ext
parent5a97c30efe6064692f3d5c33f212e3b96c9228da (diff)
downloadphp-git-8456cef1dbcb6c5a5690ce4553063ad18874f0b1.tar.gz
Fix ext/curl tests to work on every libcurl versions
Thanks Laruence :)
Diffstat (limited to 'ext')
-rw-r--r--ext/curl/tests/curl_multi_setopt_basic001.phpt2
-rw-r--r--ext/curl/tests/curl_multi_strerror_001.phpt10
-rw-r--r--ext/curl/tests/curl_share_setopt_basic001.phpt2
-rw-r--r--ext/curl/tests/curl_strerror_001.phpt14
4 files changed, 18 insertions, 10 deletions
diff --git a/ext/curl/tests/curl_multi_setopt_basic001.phpt b/ext/curl/tests/curl_multi_setopt_basic001.phpt
index af74a0f400..a13cf6d716 100644
--- a/ext/curl/tests/curl_multi_setopt_basic001.phpt
+++ b/ext/curl/tests/curl_multi_setopt_basic001.phpt
@@ -1,6 +1,7 @@
--TEST--
curl_multi_setopt basic test
--SKIPIF--
+<?php
if (!extension_loaded("curl")) {
exit("skip curl extension not loaded");
}
@@ -8,6 +9,7 @@ $curl_version = curl_version();
if ($curl_version['version_number'] < 0x071000) {
exit("skip: test works only with curl >= 7.16.0");
}
+?>
--FILE--
<?php
diff --git a/ext/curl/tests/curl_multi_strerror_001.phpt b/ext/curl/tests/curl_multi_strerror_001.phpt
index 85a665ce6f..ac330acaee 100644
--- a/ext/curl/tests/curl_multi_strerror_001.phpt
+++ b/ext/curl/tests/curl_multi_strerror_001.phpt
@@ -1,6 +1,7 @@
--TEST--
curl_multi_strerror basic test
--SKIPIF--
+<?php
if (!extension_loaded("curl")) {
exit("skip curl extension not loaded");
}
@@ -8,13 +9,14 @@ $curl_version = curl_version();
if ($curl_version['version_number'] < 0x070c00) {
exit("skip: test works only with curl >= 7.12.0");
}
+?>
--FILE--
<?php
-var_dump(curl_multi_strerror(CURLM_OK));
-var_dump(curl_multi_strerror(CURLM_BAD_HANDLE));
+var_dump(strtolower(curl_multi_strerror(CURLM_OK)));
+var_dump(strtolower(curl_multi_strerror(CURLM_BAD_HANDLE)));
?>
--EXPECTF--
-string(8) "No error"
-string(20) "Invalid multi handle"
+string(8) "no error"
+string(20) "invalid multi handle"
diff --git a/ext/curl/tests/curl_share_setopt_basic001.phpt b/ext/curl/tests/curl_share_setopt_basic001.phpt
index 88e92860b0..33c03e3337 100644
--- a/ext/curl/tests/curl_share_setopt_basic001.phpt
+++ b/ext/curl/tests/curl_share_setopt_basic001.phpt
@@ -1,9 +1,11 @@
--TEST--
curl_share_setopt basic test
--SKIPIF--
+<?php
if (!extension_loaded("curl")) {
exit("skip curl extension not loaded");
}
+?>
--FILE--
<?php
diff --git a/ext/curl/tests/curl_strerror_001.phpt b/ext/curl/tests/curl_strerror_001.phpt
index c61481bc8b..f8a0de311b 100644
--- a/ext/curl/tests/curl_strerror_001.phpt
+++ b/ext/curl/tests/curl_strerror_001.phpt
@@ -1,6 +1,7 @@
--TEST--
curl_strerror basic test
--SKIPIF--
+<?php
if (!extension_loaded("curl")) {
exit("skip curl extension not loaded");
}
@@ -8,15 +9,16 @@ $curl_version = curl_version();
if ($curl_version['version_number'] < 0x070c00) {
exit("skip: test works only with curl >= 7.12.0");
}
+?>
--FILE--
<?php
-var_dump(curl_strerror(CURLE_OK));
-var_dump(curl_strerror(CURLE_UNSUPPORTED_PROTOCOL));
-var_dump(curl_strerror(-1));
+var_dump(strtolower(curl_strerror(CURLE_OK)));
+var_dump(strtolower(curl_strerror(CURLE_UNSUPPORTED_PROTOCOL)));
+var_dump(strtolower(curl_strerror(-1)));
?>
--EXPECTF--
-string(8) "No error"
-string(20) "Unsupported protocol"
-string(13) "Unknown error"
+string(8) "no error"
+string(20) "unsupported protocol"
+string(13) "unknown error"