From 0eb45025383b0619a00531c0fa38ab12bd457822 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Ferrer=20Oca=C3=B1a?= Date: Mon, 30 May 2022 11:15:17 +0200 Subject: [PATCH] MOBILE-4061 behat: Fix custom url with path on root --- local-moodleappbehat/tests/behat/behat_app_helper.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/local-moodleappbehat/tests/behat/behat_app_helper.php b/local-moodleappbehat/tests/behat/behat_app_helper.php index 0a72f2f25..3a3d07bdf 100644 --- a/local-moodleappbehat/tests/behat/behat_app_helper.php +++ b/local-moodleappbehat/tests/behat/behat_app_helper.php @@ -513,7 +513,8 @@ class behat_app_helper extends behat_base { // Generate custom URL. $parsed_url = parse_url($CFG->behat_wwwroot); $domain = $parsed_url['host']; - $url = $this->get_mobile_url_scheme() . "://$username@$domain?token=$token&privatetoken=$privatetoken"; + $rootpath = $parsed_url['path']; + $url = $this->get_mobile_url_scheme() . "://$username@$domain/$rootpath?token=$token&privatetoken=$privatetoken"; if (!empty($path)) { $url .= '&redirect='.urlencode($CFG->behat_wwwroot.$path);