Files
cloud-apache-container/ext/cac-path-parity/tests/008-to-root-no-double-slash.phpt
T

21 lines
657 B
PHP
Raw Normal View History

--TEST--
cac_path_parity: to=/ does not produce a doubled separator
--EXTENSIONS--
cac_path_parity
--INI--
cac_path_parity.from=/mnt/users/bob/site.com
cac_path_parity.to=/
variables_order=EGPCS
--ENV--
CONTEXT_DOCUMENT_ROOT=/mnt/users/bob/site.com/public_html
--FILE--
<?php
// Degenerate mapping, unreachable from entrypoint-lsphp.sh (which always writes
// to=/home/<user>). Before the eff_to_len collapse this returned
// "//public_html". A path with a doubled leading slash is not the same string as
// the cac-fpm value, which is the entire point of this extension.
var_dump($_SERVER['CONTEXT_DOCUMENT_ROOT']);
?>
--EXPECT--
string(12) "/public_html"