mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
MDL-43185 behat: Use realpath on existing paths
This commit is contained in:
parent
d22147667d
commit
6046f1c8f1
1 changed files with 3 additions and 2 deletions
|
@ -198,12 +198,13 @@ function behat_check_config_vars() {
|
|||
|
||||
// CFG->behat_dataroot must be set and with value different than CFG->dataroot and phpunit_dataroot.
|
||||
$CFG->dataroot = realpath($CFG->dataroot);
|
||||
if (!empty($CFG->behat_dataroot)) {
|
||||
if (!empty($CFG->behat_dataroot) && is_dir($CFG->behat_dataroot)) {
|
||||
$CFG->behat_dataroot = realpath($CFG->behat_dataroot);
|
||||
}
|
||||
if (empty($CFG->behat_dataroot) ||
|
||||
($CFG->behat_dataroot == $CFG->dataroot) ||
|
||||
(!empty($CFG->phpunit_dataroot) && $CFG->behat_dataroot == $CFG->phpunit_dataroot)) {
|
||||
(!empty($CFG->phpunit_dataroot) && is_dir($CFG->phpunit_dataroot)
|
||||
&& $CFG->behat_dataroot == realpath($CFG->phpunit_dataroot))) {
|
||||
behat_error(BEHAT_EXITCODE_CONFIG,
|
||||
'Define $CFG->behat_dataroot in config.php with a value different than $CFG->dataroot and $CFG->phpunit_dataroot');
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue