Skip to content

Commit 330126e

Browse files
committed
Add optional variables for Behat wwwroot and wdhost
1 parent 61f9489 commit 330126e

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

res/template/config.php.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,11 @@ $CFG->behat_faildump_path = '{{BEHATDUMP}}';
3939
$CFG->behat_profiles = [
4040
'default' => [
4141
'browser' => 'firefox',
42-
'wd_host' => 'http://localhost:4444/wd/hub',
42+
'wd_host' => '{{BEHATWDHOST}}',
4343
],
4444
'chrome' => [
4545
'browser' => 'chrome',
46-
'wd_host' => 'http://localhost:4444/wd/hub',
46+
'wd_host' => '{{BEHATWDHOST}}',
4747
],
4848
];
4949

src/Bridge/MoodleConfig.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ public function createContents(AbstractDatabase $database, $dataDir)
4545
'{{PHPUNITDATAROOT}}' => $dataDir.'/phpu_moodledata',
4646
'{{BEHATDATAROOT}}' => $dataDir.'/behat_moodledata',
4747
'{{BEHATDUMP}}' => $dataDir.'/behat_dump',
48-
'{{BEHATWWWROOT}}' => 'http://localhost:8000',
48+
'{{BEHATWWWROOT}}' => getenv('MOODLE_BEHAT_WWWROOT') ?: 'http://localhost:8000',
49+
'{{BEHATWDHOST}}' => getenv('MOODLE_BEHAT_WDHOST') ?: 'http://localhost:4444/wd/hub',
4950
'{{EXTRACONFIG}}' => self::PLACEHOLDER,
5051
];
5152

0 commit comments

Comments
 (0)