diff options
Diffstat (limited to 'sapi/cli/tests/php_cli_server_015.phpt')
-rw-r--r-- | sapi/cli/tests/php_cli_server_015.phpt | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sapi/cli/tests/php_cli_server_015.phpt b/sapi/cli/tests/php_cli_server_015.phpt index af48758306..5821fdbbc2 100644 --- a/sapi/cli/tests/php_cli_server_015.phpt +++ b/sapi/cli/tests/php_cli_server_015.phpt @@ -9,10 +9,9 @@ display_errors=1 --FILE-- <?php include "php_cli_server.inc"; -php_cli_server_start('require("syntax_error.php");'); -$dir = realpath(__DIR__); +$doc_root = php_cli_server_start('require("syntax_error.php");')->docRoot; -file_put_contents($dir . "/syntax_error.php", "<?php non_exists_function(); ?>"); +file_put_contents($doc_root . "/syntax_error.php", "<?php non_exists_function(); ?>"); $output = ''; $host = PHP_CLI_SERVER_HOSTNAME; @@ -30,7 +29,7 @@ HEADER } } echo $output; -@unlink($dir . "/syntax_error.php"); +@unlink($doc_root . "/syntax_error.php"); fclose($fp); ?> --EXPECTF-- |