pierrick Tue, 22 Nov 2011 18:50:57 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=319697
Log:
Fix test to remove dependancy over php.net
Changed paths:
U
php/php-src/branches/PHP_5_3/ext/curl/tests/curl_multi_getcontent_basic3.phpt
U
php/php-src/branches/PHP_5_4/ext/curl/tests/curl_multi_getcontent_basic3.phpt
U php/php-src/trunk/ext/curl/tests/curl_multi_getcontent_basic3.phpt
Modified:
php/php-src/branches/PHP_5_3/ext/curl/tests/curl_multi_getcontent_basic3.phpt
===================================================================
---
php/php-src/branches/PHP_5_3/ext/curl/tests/curl_multi_getcontent_basic3.phpt
2011-11-22 18:30:13 UTC (rev 319696)
+++
php/php-src/branches/PHP_5_3/ext/curl/tests/curl_multi_getcontent_basic3.phpt
2011-11-22 18:50:57 UTC (rev 319697)
@@ -6,6 +6,9 @@
--SKIPIF--
<?php
if (!extension_loaded('curl')) print 'skip need ext/curl';
+if (false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) {
+ exit("skip PHP_CURL_HTTP_REMOTE_SERVER env variable is not defined");
+}
?>
--FILE--
<?php
@@ -16,7 +19,8 @@
$ch2=curl_init();
//SET URL AND OTHER OPTIONS
- curl_setopt($ch1, CURLOPT_URL, "http://php.net/robots.txt");
+ $host = getenv('PHP_CURL_HTTP_REMOTE_SERVER');
+ curl_setopt($ch1, CURLOPT_URL,
"{$host}/get.php?test=getpost&get_param=Hello%20World");
curl_setopt($ch2, CURLOPT_URL, "file://".dirname(__FILE__).
DIRECTORY_SEPARATOR . "curl_testdata2.txt");
curl_setopt($ch1, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch2, CURLOPT_RETURNTRANSFER, true);
@@ -46,20 +50,13 @@
echo $results2;
?>
---EXPECT--
-User-agent: *
-Disallow: /backend/
-Disallow: /distributions/
-Disallow: /stats/
-Disallow: /server-status/
-Disallow: /source.php
-Disallow: /search.php
-Disallow: /mod.php
-Disallow: /manual/add-note.php
-
-Disallow: /harming/humans
-Disallow: /ignoring/human/orders
-Disallow: /harm/to/self
-
+--EXPECTF--
+array(2) {
+ ["test"]=>
+ string(7) "getpost"
+ ["get_param"]=>
+ string(11) "Hello World"
+}
+array(0) {
+}
CURL2
-
Modified:
php/php-src/branches/PHP_5_4/ext/curl/tests/curl_multi_getcontent_basic3.phpt
===================================================================
---
php/php-src/branches/PHP_5_4/ext/curl/tests/curl_multi_getcontent_basic3.phpt
2011-11-22 18:30:13 UTC (rev 319696)
+++
php/php-src/branches/PHP_5_4/ext/curl/tests/curl_multi_getcontent_basic3.phpt
2011-11-22 18:50:57 UTC (rev 319697)
@@ -6,6 +6,9 @@
--SKIPIF--
<?php
if (!extension_loaded('curl')) print 'skip need ext/curl';
+if (false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) {
+ exit("skip PHP_CURL_HTTP_REMOTE_SERVER env variable is not defined");
+}
?>
--FILE--
<?php
@@ -16,7 +19,8 @@
$ch2=curl_init();
//SET URL AND OTHER OPTIONS
- curl_setopt($ch1, CURLOPT_URL, "http://php.net/robots.txt");
+ $host = getenv('PHP_CURL_HTTP_REMOTE_SERVER');
+ curl_setopt($ch1, CURLOPT_URL,
"{$host}/get.php?test=getpost&get_param=Hello%20World");
curl_setopt($ch2, CURLOPT_URL, "file://".dirname(__FILE__).
DIRECTORY_SEPARATOR . "curl_testdata2.txt");
curl_setopt($ch1, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch2, CURLOPT_RETURNTRANSFER, true);
@@ -46,20 +50,13 @@
echo $results2;
?>
---EXPECT--
-User-agent: *
-Disallow: /backend/
-Disallow: /distributions/
-Disallow: /stats/
-Disallow: /server-status/
-Disallow: /source.php
-Disallow: /search.php
-Disallow: /mod.php
-Disallow: /manual/add-note.php
-
-Disallow: /harming/humans
-Disallow: /ignoring/human/orders
-Disallow: /harm/to/self
-
+--EXPECTF--
+array(2) {
+ ["test"]=>
+ string(7) "getpost"
+ ["get_param"]=>
+ string(11) "Hello World"
+}
+array(0) {
+}
CURL2
-
Modified: php/php-src/trunk/ext/curl/tests/curl_multi_getcontent_basic3.phpt
===================================================================
--- php/php-src/trunk/ext/curl/tests/curl_multi_getcontent_basic3.phpt
2011-11-22 18:30:13 UTC (rev 319696)
+++ php/php-src/trunk/ext/curl/tests/curl_multi_getcontent_basic3.phpt
2011-11-22 18:50:57 UTC (rev 319697)
@@ -6,6 +6,9 @@
--SKIPIF--
<?php
if (!extension_loaded('curl')) print 'skip need ext/curl';
+if (false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) {
+ exit("skip PHP_CURL_HTTP_REMOTE_SERVER env variable is not defined");
+}
?>
--FILE--
<?php
@@ -16,7 +19,8 @@
$ch2=curl_init();
//SET URL AND OTHER OPTIONS
- curl_setopt($ch1, CURLOPT_URL, "http://php.net/robots.txt");
+ $host = getenv('PHP_CURL_HTTP_REMOTE_SERVER');
+ curl_setopt($ch1, CURLOPT_URL,
"{$host}/get.php?test=getpost&get_param=Hello%20World");
curl_setopt($ch2, CURLOPT_URL, "file://".dirname(__FILE__).
DIRECTORY_SEPARATOR . "curl_testdata2.txt");
curl_setopt($ch1, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch2, CURLOPT_RETURNTRANSFER, true);
@@ -46,20 +50,13 @@
echo $results2;
?>
---EXPECT--
-User-agent: *
-Disallow: /backend/
-Disallow: /distributions/
-Disallow: /stats/
-Disallow: /server-status/
-Disallow: /source.php
-Disallow: /search.php
-Disallow: /mod.php
-Disallow: /manual/add-note.php
-
-Disallow: /harming/humans
-Disallow: /ignoring/human/orders
-Disallow: /harm/to/self
-
+--EXPECTF--
+array(2) {
+ ["test"]=>
+ string(7) "getpost"
+ ["get_param"]=>
+ string(11) "Hello World"
+}
+array(0) {
+}
CURL2
-
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php