--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
--- /dev/null
+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>