]> granicus.if.org Git - php/commitdiff
Add/Fix SKIPIF sections of cURL tests
authorandy wharmby <wharmby@php.net>
Thu, 11 Jun 2009 21:11:20 +0000 (21:11 +0000)
committerandy wharmby <wharmby@php.net>
Thu, 11 Jun 2009 21:11:20 +0000 (21:11 +0000)
ext/curl/tests/bug45161.phpt
ext/curl/tests/bug46711.phpt
ext/curl/tests/bug46739.phpt
ext/curl/tests/bug48203.phpt

index 46d981054c2920b71afaf9e42a37b362aeead2a6..9fdc7a7e228103f6bae779568f9ca645f619f5b4 100644 (file)
@@ -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
 
index ac8f04123679f185d9d93e8fb27f807808f828ef..8eef5562fe71086f1a0c4d71e33a226fdbd040b9 100644 (file)
@@ -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();
index 06a84ea8ed8eedc147b66f2884f3777167af2a70..52bfbc8ff39a71e9a1f1fdea16feb62522edcb53 100644 (file)
@@ -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/');
index c0e5c29cbb920386a4c20563ee4a0722862b9976..84fcf83a069b627b93a14b8e0292d7ffad00e5a9 100644 (file)
@@ -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