cataphract Mon, 14 Nov 2011 01:12:23 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=319140
Log:
- Fixed tests in ext/standard/tests/http by adding the INI setting value
allow_url_fopen=1
- Converted test file from dos line endings to unix line endings.
Changed paths:
U php/php-src/branches/PHP_5_3/ext/standard/tests/http/bug38802.phpt
U php/php-src/branches/PHP_5_3/ext/standard/tests/http/bug43510.phpt
U php/php-src/branches/PHP_5_3/ext/standard/tests/http/bug48929.phpt
U php/php-src/branches/PHP_5_3/ext/standard/tests/http/bug53198.phpt
U php/php-src/branches/PHP_5_3/ext/standard/tests/http/ignore_errors.phpt
U php/php-src/branches/PHP_5_4/ext/standard/tests/http/bug38802.phpt
U php/php-src/branches/PHP_5_4/ext/standard/tests/http/bug43510.phpt
U php/php-src/branches/PHP_5_4/ext/standard/tests/http/bug48929.phpt
U php/php-src/branches/PHP_5_4/ext/standard/tests/http/bug53198.phpt
U php/php-src/branches/PHP_5_4/ext/standard/tests/http/ignore_errors.phpt
U php/php-src/trunk/ext/standard/tests/http/bug38802.phpt
U php/php-src/trunk/ext/standard/tests/http/bug43510.phpt
U php/php-src/trunk/ext/standard/tests/http/bug48929.phpt
U php/php-src/trunk/ext/standard/tests/http/bug53198.phpt
U php/php-src/trunk/ext/standard/tests/http/ignore_errors.phpt
Modified: php/php-src/branches/PHP_5_3/ext/standard/tests/http/bug38802.phpt
===================================================================
--- php/php-src/branches/PHP_5_3/ext/standard/tests/http/bug38802.phpt 2011-11-14 00:55:11 UTC (rev 319139)
+++ php/php-src/branches/PHP_5_3/ext/standard/tests/http/bug38802.phpt 2011-11-14 01:12:23 UTC (rev 319140)
@@ -1,5 +1,7 @@
--TEST--
Bug #38802 (ignore_errors and max_redirects)
+--INI--
+allow_url_fopen=1
--SKIPIF--
<?php require 'server.inc'; http_server_skipif('tcp://127.0.0.1:12342'); ?>
--FILE--
Modified: php/php-src/branches/PHP_5_3/ext/standard/tests/http/bug43510.phpt
===================================================================
--- php/php-src/branches/PHP_5_3/ext/standard/tests/http/bug43510.phpt 2011-11-14 00:55:11 UTC (rev 319139)
+++ php/php-src/branches/PHP_5_3/ext/standard/tests/http/bug43510.phpt 2011-11-14 01:12:23 UTC (rev 319140)
@@ -1,5 +1,7 @@
--TEST--
Bug #43510 (stream_get_meta_data() does not return same mode as used in fopen)
+--INI--
+allow_url_fopen=1
--SKIPIF--
<?php require 'server.inc'; http_server_skipif('tcp://127.0.0.1:12342'); ?>
--FILE--
Modified: php/php-src/branches/PHP_5_3/ext/standard/tests/http/bug48929.phpt
===================================================================
--- php/php-src/branches/PHP_5_3/ext/standard/tests/http/bug48929.phpt 2011-11-14 00:55:11 UTC (rev 319139)
+++ php/php-src/branches/PHP_5_3/ext/standard/tests/http/bug48929.phpt 2011-11-14 01:12:23 UTC (rev 319140)
@@ -1,5 +1,7 @@
--TEST--
Bug #48929 (duplicate \r\n sent after last header line)
+--INI--
+allow_url_fopen=1
--SKIPIF--
<?php require 'server.inc'; http_server_skipif('tcp://127.0.0.1:12342'); ?>
--FILE--
Modified: php/php-src/branches/PHP_5_3/ext/standard/tests/http/bug53198.phpt
===================================================================
--- php/php-src/branches/PHP_5_3/ext/standard/tests/http/bug53198.phpt 2011-11-14 00:55:11 UTC (rev 319139)
+++ php/php-src/branches/PHP_5_3/ext/standard/tests/http/bug53198.phpt 2011-11-14 01:12:23 UTC (rev 319140)
@@ -1,56 +1,57 @@
---TEST--
-Bug #53198 (From: header cannot be changed with ini_set)
---SKIPIF--
-<?php require 'server.inc'; http_server_skipif('tcp://127.0.0.1:12342'); ?>
---INI--
[email protected]
---FILE--
-<?php
-require 'server.inc';
-
-function do_test() {
-
- $responses = array(
- "data://text/plain,HTTP/1.0 200 OK\r\n\r\n",
- );
-
- $pid = http_server("tcp://127.0.0.1:12342", $responses, $output);
-
- foreach($responses as $r) {
-
- $fd = fopen('http://127.0.0.1:12342/', 'rb', false);
-
- fseek($output, 0, SEEK_SET);
- var_dump(stream_get_contents($output));
- fseek($output, 0, SEEK_SET);
- }
-
- http_server_kill($pid);
-
-}
-
-echo "-- Test: leave default --\n";
-
-do_test();
-
-echo "-- Test: after ini_set --\n";
-
-ini_set('from', '[email protected]');
-
-do_test();
-
-?>
---EXPECT--
--- Test: leave default --
-string(63) "GET / HTTP/1.0
-From: [email protected]
-Host: 127.0.0.1:12342
-
-"
--- Test: after ini_set --
-string(62) "GET / HTTP/1.0
-From: [email protected]
-Host: 127.0.0.1:12342
-
-"
-
+--TEST--
+Bug #53198 (From: header cannot be changed with ini_set)
+--SKIPIF--
+<?php require 'server.inc'; http_server_skipif('tcp://127.0.0.1:12342'); ?>
+--INI--
+allow_url_fopen=1
[email protected]
+--FILE--
+<?php
+require 'server.inc';
+
+function do_test() {
+
+ $responses = array(
+ "data://text/plain,HTTP/1.0 200 OK\r\n\r\n",
+ );
+
+ $pid = http_server("tcp://127.0.0.1:12342", $responses, $output);
+
+ foreach($responses as $r) {
+
+ $fd = fopen('http://127.0.0.1:12342/', 'rb', false);
+
+ fseek($output, 0, SEEK_SET);
+ var_dump(stream_get_contents($output));
+ fseek($output, 0, SEEK_SET);
+ }
+
+ http_server_kill($pid);
+
+}
+
+echo "-- Test: leave default --\n";
+
+do_test();
+
+echo "-- Test: after ini_set --\n";
+
+ini_set('from', '[email protected]');
+
+do_test();
+
+?>
+--EXPECT--
+-- Test: leave default --
+string(63) "GET / HTTP/1.0
+From: [email protected]
+Host: 127.0.0.1:12342
+
+"
+-- Test: after ini_set --
+string(62) "GET / HTTP/1.0
+From: [email protected]
+Host: 127.0.0.1:12342
+
+"
+
Modified: php/php-src/branches/PHP_5_3/ext/standard/tests/http/ignore_errors.phpt
===================================================================
--- php/php-src/branches/PHP_5_3/ext/standard/tests/http/ignore_errors.phpt 2011-11-14 00:55:11 UTC (rev 319139)
+++ php/php-src/branches/PHP_5_3/ext/standard/tests/http/ignore_errors.phpt 2011-11-14 01:12:23 UTC (rev 319140)
@@ -1,5 +1,7 @@
--TEST--
http:// and ignore_errors
+--INI--
+allow_url_fopen=1
--SKIPIF--
<?php require 'server.inc'; http_server_skipif('tcp://127.0.0.1:12342'); ?>
--FILE--
Modified: php/php-src/branches/PHP_5_4/ext/standard/tests/http/bug38802.phpt
===================================================================
--- php/php-src/branches/PHP_5_4/ext/standard/tests/http/bug38802.phpt 2011-11-14 00:55:11 UTC (rev 319139)
+++ php/php-src/branches/PHP_5_4/ext/standard/tests/http/bug38802.phpt 2011-11-14 01:12:23 UTC (rev 319140)
@@ -1,5 +1,7 @@
--TEST--
Bug #38802 (ignore_errors and max_redirects)
+--INI--
+allow_url_fopen=1
--SKIPIF--
<?php require 'server.inc'; http_server_skipif('tcp://127.0.0.1:12342'); ?>
--FILE--
Modified: php/php-src/branches/PHP_5_4/ext/standard/tests/http/bug43510.phpt
===================================================================
--- php/php-src/branches/PHP_5_4/ext/standard/tests/http/bug43510.phpt 2011-11-14 00:55:11 UTC (rev 319139)
+++ php/php-src/branches/PHP_5_4/ext/standard/tests/http/bug43510.phpt 2011-11-14 01:12:23 UTC (rev 319140)
@@ -1,5 +1,7 @@
--TEST--
Bug #43510 (stream_get_meta_data() does not return same mode as used in fopen)
+--INI--
+allow_url_fopen=1
--SKIPIF--
<?php require 'server.inc'; http_server_skipif('tcp://127.0.0.1:12342'); ?>
--FILE--
Modified: php/php-src/branches/PHP_5_4/ext/standard/tests/http/bug48929.phpt
===================================================================
--- php/php-src/branches/PHP_5_4/ext/standard/tests/http/bug48929.phpt 2011-11-14 00:55:11 UTC (rev 319139)
+++ php/php-src/branches/PHP_5_4/ext/standard/tests/http/bug48929.phpt 2011-11-14 01:12:23 UTC (rev 319140)
@@ -1,5 +1,7 @@
--TEST--
Bug #48929 (duplicate \r\n sent after last header line)
+--INI--
+allow_url_fopen=1
--SKIPIF--
<?php require 'server.inc'; http_server_skipif('tcp://127.0.0.1:12342'); ?>
--FILE--
Modified: php/php-src/branches/PHP_5_4/ext/standard/tests/http/bug53198.phpt
===================================================================
--- php/php-src/branches/PHP_5_4/ext/standard/tests/http/bug53198.phpt 2011-11-14 00:55:11 UTC (rev 319139)
+++ php/php-src/branches/PHP_5_4/ext/standard/tests/http/bug53198.phpt 2011-11-14 01:12:23 UTC (rev 319140)
@@ -1,56 +1,57 @@
---TEST--
-Bug #53198 (From: header cannot be changed with ini_set)
---SKIPIF--
-<?php require 'server.inc'; http_server_skipif('tcp://127.0.0.1:12342'); ?>
---INI--
[email protected]
---FILE--
-<?php
-require 'server.inc';
-
-function do_test() {
-
- $responses = array(
- "data://text/plain,HTTP/1.0 200 OK\r\n\r\n",
- );
-
- $pid = http_server("tcp://127.0.0.1:12342", $responses, $output);
-
- foreach($responses as $r) {
-
- $fd = fopen('http://127.0.0.1:12342/', 'rb', false);
-
- fseek($output, 0, SEEK_SET);
- var_dump(stream_get_contents($output));
- fseek($output, 0, SEEK_SET);
- }
-
- http_server_kill($pid);
-
-}
-
-echo "-- Test: leave default --\n";
-
-do_test();
-
-echo "-- Test: after ini_set --\n";
-
-ini_set('from', '[email protected]');
-
-do_test();
-
-?>
---EXPECT--
--- Test: leave default --
-string(63) "GET / HTTP/1.0
-From: [email protected]
-Host: 127.0.0.1:12342
-
-"
--- Test: after ini_set --
-string(62) "GET / HTTP/1.0
-From: [email protected]
-Host: 127.0.0.1:12342
-
-"
-
+--TEST--
+Bug #53198 (From: header cannot be changed with ini_set)
+--SKIPIF--
+<?php require 'server.inc'; http_server_skipif('tcp://127.0.0.1:12342'); ?>
+--INI--
+allow_url_fopen=1
[email protected]
+--FILE--
+<?php
+require 'server.inc';
+
+function do_test() {
+
+ $responses = array(
+ "data://text/plain,HTTP/1.0 200 OK\r\n\r\n",
+ );
+
+ $pid = http_server("tcp://127.0.0.1:12342", $responses, $output);
+
+ foreach($responses as $r) {
+
+ $fd = fopen('http://127.0.0.1:12342/', 'rb', false);
+
+ fseek($output, 0, SEEK_SET);
+ var_dump(stream_get_contents($output));
+ fseek($output, 0, SEEK_SET);
+ }
+
+ http_server_kill($pid);
+
+}
+
+echo "-- Test: leave default --\n";
+
+do_test();
+
+echo "-- Test: after ini_set --\n";
+
+ini_set('from', '[email protected]');
+
+do_test();
+
+?>
+--EXPECT--
+-- Test: leave default --
+string(63) "GET / HTTP/1.0
+From: [email protected]
+Host: 127.0.0.1:12342
+
+"
+-- Test: after ini_set --
+string(62) "GET / HTTP/1.0
+From: [email protected]
+Host: 127.0.0.1:12342
+
+"
+
Modified: php/php-src/branches/PHP_5_4/ext/standard/tests/http/ignore_errors.phpt
===================================================================
--- php/php-src/branches/PHP_5_4/ext/standard/tests/http/ignore_errors.phpt 2011-11-14 00:55:11 UTC (rev 319139)
+++ php/php-src/branches/PHP_5_4/ext/standard/tests/http/ignore_errors.phpt 2011-11-14 01:12:23 UTC (rev 319140)
@@ -1,5 +1,7 @@
--TEST--
http:// and ignore_errors
+--INI--
+allow_url_fopen=1
--SKIPIF--
<?php require 'server.inc'; http_server_skipif('tcp://127.0.0.1:12342'); ?>
--FILE--
Modified: php/php-src/trunk/ext/standard/tests/http/bug38802.phpt
===================================================================
--- php/php-src/trunk/ext/standard/tests/http/bug38802.phpt 2011-11-14 00:55:11 UTC (rev 319139)
+++ php/php-src/trunk/ext/standard/tests/http/bug38802.phpt 2011-11-14 01:12:23 UTC (rev 319140)
@@ -1,5 +1,7 @@
--TEST--
Bug #38802 (ignore_errors and max_redirects)
+--INI--
+allow_url_fopen=1
--SKIPIF--
<?php require 'server.inc'; http_server_skipif('tcp://127.0.0.1:12342'); ?>
--FILE--
Modified: php/php-src/trunk/ext/standard/tests/http/bug43510.phpt
===================================================================
--- php/php-src/trunk/ext/standard/tests/http/bug43510.phpt 2011-11-14 00:55:11 UTC (rev 319139)
+++ php/php-src/trunk/ext/standard/tests/http/bug43510.phpt 2011-11-14 01:12:23 UTC (rev 319140)
@@ -1,5 +1,7 @@
--TEST--
Bug #43510 (stream_get_meta_data() does not return same mode as used in fopen)
+--INI--
+allow_url_fopen=1
--SKIPIF--
<?php require 'server.inc'; http_server_skipif('tcp://127.0.0.1:12342'); ?>
--FILE--
Modified: php/php-src/trunk/ext/standard/tests/http/bug48929.phpt
===================================================================
--- php/php-src/trunk/ext/standard/tests/http/bug48929.phpt 2011-11-14 00:55:11 UTC (rev 319139)
+++ php/php-src/trunk/ext/standard/tests/http/bug48929.phpt 2011-11-14 01:12:23 UTC (rev 319140)
@@ -1,5 +1,7 @@
--TEST--
Bug #48929 (duplicate \r\n sent after last header line)
+--INI--
+allow_url_fopen=1
--SKIPIF--
<?php require 'server.inc'; http_server_skipif('tcp://127.0.0.1:12342'); ?>
--FILE--
Modified: php/php-src/trunk/ext/standard/tests/http/bug53198.phpt
===================================================================
--- php/php-src/trunk/ext/standard/tests/http/bug53198.phpt 2011-11-14 00:55:11 UTC (rev 319139)
+++ php/php-src/trunk/ext/standard/tests/http/bug53198.phpt 2011-11-14 01:12:23 UTC (rev 319140)
@@ -1,56 +1,57 @@
---TEST--
-Bug #53198 (From: header cannot be changed with ini_set)
---SKIPIF--
-<?php require 'server.inc'; http_server_skipif('tcp://127.0.0.1:12342'); ?>
---INI--
[email protected]
---FILE--
-<?php
-require 'server.inc';
-
-function do_test() {
-
- $responses = array(
- "data://text/plain,HTTP/1.0 200 OK\r\n\r\n",
- );
-
- $pid = http_server("tcp://127.0.0.1:12342", $responses, $output);
-
- foreach($responses as $r) {
-
- $fd = fopen('http://127.0.0.1:12342/', 'rb', false);
-
- fseek($output, 0, SEEK_SET);
- var_dump(stream_get_contents($output));
- fseek($output, 0, SEEK_SET);
- }
-
- http_server_kill($pid);
-
-}
-
-echo "-- Test: leave default --\n";
-
-do_test();
-
-echo "-- Test: after ini_set --\n";
-
-ini_set('from', '[email protected]');
-
-do_test();
-
-?>
---EXPECT--
--- Test: leave default --
-string(63) "GET / HTTP/1.0
-From: [email protected]
-Host: 127.0.0.1:12342
-
-"
--- Test: after ini_set --
-string(62) "GET / HTTP/1.0
-From: [email protected]
-Host: 127.0.0.1:12342
-
-"
-
+--TEST--
+Bug #53198 (From: header cannot be changed with ini_set)
+--SKIPIF--
+<?php require 'server.inc'; http_server_skipif('tcp://127.0.0.1:12342'); ?>
+--INI--
+allow_url_fopen=1
[email protected]
+--FILE--
+<?php
+require 'server.inc';
+
+function do_test() {
+
+ $responses = array(
+ "data://text/plain,HTTP/1.0 200 OK\r\n\r\n",
+ );
+
+ $pid = http_server("tcp://127.0.0.1:12342", $responses, $output);
+
+ foreach($responses as $r) {
+
+ $fd = fopen('http://127.0.0.1:12342/', 'rb', false);
+
+ fseek($output, 0, SEEK_SET);
+ var_dump(stream_get_contents($output));
+ fseek($output, 0, SEEK_SET);
+ }
+
+ http_server_kill($pid);
+
+}
+
+echo "-- Test: leave default --\n";
+
+do_test();
+
+echo "-- Test: after ini_set --\n";
+
+ini_set('from', '[email protected]');
+
+do_test();
+
+?>
+--EXPECT--
+-- Test: leave default --
+string(63) "GET / HTTP/1.0
+From: [email protected]
+Host: 127.0.0.1:12342
+
+"
+-- Test: after ini_set --
+string(62) "GET / HTTP/1.0
+From: [email protected]
+Host: 127.0.0.1:12342
+
+"
+
Modified: php/php-src/trunk/ext/standard/tests/http/ignore_errors.phpt
===================================================================
--- php/php-src/trunk/ext/standard/tests/http/ignore_errors.phpt 2011-11-14 00:55:11 UTC (rev 319139)
+++ php/php-src/trunk/ext/standard/tests/http/ignore_errors.phpt 2011-11-14 01:12:23 UTC (rev 319140)
@@ -1,5 +1,7 @@
--TEST--
http:// and ignore_errors
+--INI--
+allow_url_fopen=1
--SKIPIF--
<?php require 'server.inc'; http_server_skipif('tcp://127.0.0.1:12342'); ?>
--FILE--
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php