summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandy wharmby <wharmby@php.net>2009-06-11 21:11:23 +0000
committerandy wharmby <wharmby@php.net>2009-06-11 21:11:23 +0000
commitaa152b1c509a7da8dda42eec1cd9806bcb11d4a1 (patch)
tree8f3403efef591fc91aeb3a8a3427087ad772d07a
parent32c8f50ea9dc0ea65ed22d34ec00dadbae7f87bb (diff)
downloadphp-git-aa152b1c509a7da8dda42eec1cd9806bcb11d4a1.tar.gz
Add/Fix SKIPIF sections of cURL tests
-rw-r--r--ext/curl/tests/bug45161.phpt16
-rw-r--r--ext/curl/tests/bug46711.phpt9
-rw-r--r--ext/curl/tests/bug46739.phpt9
-rw-r--r--ext/curl/tests/bug48203.phpt9
4 files changed, 42 insertions, 1 deletions
diff --git a/ext/curl/tests/bug45161.phpt b/ext/curl/tests/bug45161.phpt
index 46d981054c..1ae81873ec 100644
--- a/ext/curl/tests/bug45161.phpt
+++ b/ext/curl/tests/bug45161.phpt
@@ -1,7 +1,21 @@
--TEST--
Bug #45161 (Reusing a curl handle leaks memory)
--SKIPIF--
-<?php $curl_version = curl_version(); if ($curl_version['version_number'] < 0x071100) die("skip: test works only with curl >= 7.17.0"); ?>
+<?php
+if (substr(PHP_OS, 0, 3) == 'WIN') {
+ exit("skip not for Windows");
+}
+if (!extension_loaded("curl")) {
+ exit("skip curl extension not loaded");
+}
+if (false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) {
+ exit("skip PHP_CURL_HTTP_REMOTE_SERVER env variable is not defined");
+}
+$curl_version = curl_version();
+if ($curl_version['version_number'] < 0x071100) {
+ exit("skip: test works only with curl >= 7.17.0");
+}
+?>
--FILE--
<?php
diff --git a/ext/curl/tests/bug46711.phpt b/ext/curl/tests/bug46711.phpt
index ac8f041236..8eef5562fe 100644
--- a/ext/curl/tests/bug46711.phpt
+++ b/ext/curl/tests/bug46711.phpt
@@ -1,5 +1,14 @@
--TEST--
Bug #46711 (lost memory when foreach is used for values passed to curl_setopt())
+--SKIPIF--
+<?php
+if (!extension_loaded("curl")) {
+ exit("skip curl extension not loaded");
+}
+if (false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) {
+ exit("skip PHP_CURL_HTTP_REMOTE_SERVER env variable is not defined");
+}
+?>
--FILE--
<?php
$ch = curl_init();
diff --git a/ext/curl/tests/bug46739.phpt b/ext/curl/tests/bug46739.phpt
index 06a84ea8ed..52bfbc8ff3 100644
--- a/ext/curl/tests/bug46739.phpt
+++ b/ext/curl/tests/bug46739.phpt
@@ -1,5 +1,14 @@
--TEST--
Bug #46739 (array returned by curl_getinfo should contain content_type key)
+--SKIPIF--
+<?php
+if (!extension_loaded("curl")) {
+ exit("skip curl extension not loaded");
+}
+if (false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) {
+ exit("skip PHP_CURL_HTTP_REMOTE_SERVER env variable is not defined");
+}
+?>
--FILE--
<?php
$ch = curl_init('http://127.0.0.1:9/');
diff --git a/ext/curl/tests/bug48203.phpt b/ext/curl/tests/bug48203.phpt
index c0e5c29cbb..84fcf83a06 100644
--- a/ext/curl/tests/bug48203.phpt
+++ b/ext/curl/tests/bug48203.phpt
@@ -1,5 +1,14 @@
--TEST--
Bug #48203 (Crash when CURLOPT_STDERR is set to regular file)
+--SKIPIF--
+<?php
+if (!extension_loaded("curl")) {
+ exit("skip curl extension not loaded");
+}
+if (false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) {
+ exit("skip PHP_CURL_HTTP_REMOTE_SERVER env variable is not defined");
+}
+?>
--FILE--
<?php