mirror of
https://github.com/php/php-src.git
synced 2026-03-24 08:12:21 +01:00
Port the main php_cli_server.inc to use ephemeral ports, thus allowing CLI server tests to be parallelized. A complication here is that we also need to give each test a separate doc root, to avoid index.php files writing over each other. Closes GH-6375.
19 lines
419 B
PHP
19 lines
419 B
PHP
--TEST--
|
|
Bug #68291 (404 on urls with '+')
|
|
--INI--
|
|
allow_url_fopen=1
|
|
--SKIPIF--
|
|
<?php
|
|
include "skipif.inc";
|
|
?>
|
|
--FILE--
|
|
<?php
|
|
include "php_cli_server.inc";
|
|
$docRoot = php_cli_server_start(NULL, NULL)->docRoot;
|
|
file_put_contents($docRoot . '/bug68291+test.html', 'Found');
|
|
echo file_get_contents('http://' . PHP_CLI_SERVER_ADDRESS . '/bug68291+test.html');
|
|
@unlink($docRoot . '/bug68291+test.html');
|
|
?>
|
|
--EXPECT--
|
|
Found
|