Updating CakeTestSuiteDispatcher parsing of .

Better handling of cases where dirname() of PHP_SELF returns only '/'.
This commit is contained in:
Joël Perras 2010-01-13 22:29:10 -05:00
parent ff3aefe93a
commit 88a09cfbb4

View file

@ -76,7 +76,8 @@ class CakeTestSuiteDispatcher {
*/ */
function CakeTestSuiteDispatcher() { function CakeTestSuiteDispatcher() {
$this->_baseUrl = $_SERVER['PHP_SELF']; $this->_baseUrl = $_SERVER['PHP_SELF'];
$this->_baseDir = dirname($this->_baseUrl) . '/'; $dir = dirname($this->_baseUrl);
$this->_baseDir = ($dir === '/') ? $dir : $dir . '/';
} }
/** /**