Skip to content

Commit

Permalink
MDL-37555 Apply realpath() 2 CFG->phpunit_dataroot
Browse files Browse the repository at this point in the history
  • Loading branch information
stronk7 committed Jan 16, 2013
1 parent e4863a1 commit 7b85d7a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/phpunit/bootstrap.php
Expand Up @@ -93,6 +93,9 @@
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!');
}
Expand Down

0 comments on commit 7b85d7a

Please sign in to comment.