diff options
-rw-r--r-- | ext/standard/tests/network/http-stream.phpt | 10 | ||||
-rw-r--r-- | ext/standard/tests/network/news.rss | 28 |
2 files changed, 36 insertions, 2 deletions
diff --git a/ext/standard/tests/network/http-stream.phpt b/ext/standard/tests/network/http-stream.phpt index 99245f709e..1186060096 100644 --- a/ext/standard/tests/network/http-stream.phpt +++ b/ext/standard/tests/network/http-stream.phpt @@ -3,16 +3,22 @@ http-stream test --SKIPIF-- <?php if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); -if (getenv("SKIP_ONLINE_TESTS")) die("skip online test"); if (!extension_loaded("dom")) die("skip dom extension is not present"); +require __DIR__.'/../http/server.inc'; +http_server_skipif('tcp://127.0.0.1:12342'); ?> --INI-- allow_url_fopen=1 --FILE-- <?php +require __DIR__.'/../http/server.inc'; + +$pid = http_server("tcp://127.0.0.1:12342", [__DIR__."/news.rss"]); + $d = new DomDocument; -$e = $d->load("http://php.net/news.rss"); +$e = $d->load("http://127.0.0.1:12342/news.rss"); echo "ALIVE\n"; +http_server_kill($pid); ?> --EXPECTF-- ALIVE diff --git a/ext/standard/tests/network/news.rss b/ext/standard/tests/network/news.rss new file mode 100644 index 0000000000..f80b82cbd7 --- /dev/null +++ b/ext/standard/tests/network/news.rss @@ -0,0 +1,28 @@ +HTTP/1.1 200 OK +Content-Type: text/xml + +<?xml version="1.0" encoding="utf-8"?> +<rdf:RDF + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns="http://purl.org/rss/1.0/" + xmlns:dc="http://purl.org/dc/elements/1.1/" +> +<channel rdf:about="http://php.net/"> + <title>PHP: Hypertext Preprocessor</title> + <link>http://php.net/</link> + <description>The PHP scripting language web site</description> + <items> + <rdf:Seq> + <rdf:li rdf:resource="http://php.net/index.php#id2015-01-22-3" /> + </rdf:Seq> + </items> +</channel> + +<item rdf:about="http://php.net/index.php#id2015-01-22-3"> + <title>PHP 5.4.37 Released</title> + <link>http://php.net/index.php#id2015-01-22-3</link> + <description>The PHP development team announces the immediate availability of PHP 5.4.37. Six security-related bugs were fixed in this release, including CVE-2015-0231, CVE-2014-9427 and CVE-2015-0232. All PHP 5.4 users are encouraged to upgrade to this version. For source downloads of PHP 5.4.37 please visit our downloads page, Windows binaries can be found on windows.php.net/download/. The list of changes is recorded in the ChangeLog.</description> + <dc:date>2015-01-22</dc:date> +</item> + +</rdf:RDF> |