From c6523d2f943bc4e72f4486f299d358bd110cabd9 Mon Sep 17 00:00:00 2001 From: "Eloy Lafuente (stronk7)" Date: Wed, 16 Jan 2013 16:15:56 +0100 Subject: [PATCH] MDL-37555 Apply realpath() 2 CFG->phpunit_dataroot --- lib/phpunit/bootstrap.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/phpunit/bootstrap.php b/lib/phpunit/bootstrap.php index 6ead09fec42..f94c2950d6f 100644 --- a/lib/phpunit/bootstrap.php +++ b/lib/phpunit/bootstrap.php @@ -93,6 +93,9 @@ $CFG->filepermissions = ($CFG->directorypermissions & 0666); if (!isset($CFG->phpunit_dataroot)) { phpunit_bootstrap_error(PHPUNIT_EXITCODE_CONFIGERROR, 'Missing $CFG->phpunit_dataroot in config.php, can not run tests!'); } +// Ensure we access to phpunit_dataroot realpath always. +$CFG->phpunit_dataroot = realpath($CFG->phpunit_dataroot); + if (isset($CFG->dataroot) and $CFG->phpunit_dataroot === $CFG->dataroot) { phpunit_bootstrap_error(PHPUNIT_EXITCODE_CONFIGERROR, '$CFG->dataroot and $CFG->phpunit_dataroot must not be identical, can not run tests!'); }