MDL-63977 Behat: Rename Ionic config variables for consistency

main
sam marshall 2019-02-11 16:40:56 +00:00
parent ebe805c843
commit 165c117bca
1 changed files with 5 additions and 5 deletions

View File

@ -103,8 +103,8 @@ class behat_app extends behat_base {
} }
// Check the config settings are defined. // Check the config settings are defined.
if (empty($CFG->behat_ionicaddress) && empty($CFG->behat_approot)) { if (empty($CFG->behat_ionic_wwwroot) && empty($CFG->behat_ionic_dirroot)) {
throw new DriverException('$CFG->behat_ionicaddress or $CFG->behat_approot must be defined.'); throw new DriverException('$CFG->behat_ionic_wwwroot or $CFG->behat_ionic_dirroot must be defined.');
} }
} }
@ -176,15 +176,15 @@ class behat_app extends behat_base {
protected function start_or_reuse_ionic() { protected function start_or_reuse_ionic() {
global $CFG; global $CFG;
if (!empty($CFG->behat_ionicaddress)) { if (!empty($CFG->behat_ionic_wwwroot)) {
// Use supplied Ionic server which should already be running. // Use supplied Ionic server which should already be running.
$url = $CFG->behat_ionicaddress; $url = $CFG->behat_ionic_wwwroot;
} else if (self::$ionicrunning) { } else if (self::$ionicrunning) {
// Use existing Ionic instance launched previously. // Use existing Ionic instance launched previously.
$url = self::$ionicrunning->url; $url = self::$ionicrunning->url;
} else { } else {
// Open Ionic process in relevant path. // Open Ionic process in relevant path.
$path = realpath($CFG->behat_approot); $path = realpath($CFG->behat_ionic_dirroot);
$stderrfile = $CFG->dataroot . '/behat/ionic-stderr.log'; $stderrfile = $CFG->dataroot . '/behat/ionic-stderr.log';
$prefix = ''; $prefix = '';
// Except on Windows, use 'exec' so that we get the pid of the actual Node process // Except on Windows, use 'exec' so that we get the pid of the actual Node process