1
0
mirror of https://github.com/php/php-src.git synced 2026-04-14 03:22:58 +02:00
Files
archived-php-src/ext/standard/tests/network/http-stream.phpt
Gabriel Caruso ded3d984c6 Use EXPECT instead of EXPECTF when possible
EXPECTF logic in run-tests.php is considerable, so let's avoid it.
2018-02-20 21:53:48 +01:00

25 lines
538 B
PHP

--TEST--
http-stream test
--SKIPIF--
<?php
if (getenv("SKIP_SLOW_TESTS")) die("skip slow 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://127.0.0.1:12342/news.rss");
echo "ALIVE\n";
http_server_kill($pid);
?>
--EXPECT--
ALIVE