From 2c80555c1b2dd8f066ed9c05a3295a26d71f50e4 Mon Sep 17 00:00:00 2001 From: Dani Palou Date: Wed, 18 May 2022 13:10:46 +0200 Subject: [PATCH] MOBILE-4069 behat: Fix bug when checking URL in browser tab --- local-moodleappbehat/tests/behat/behat_app.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/local-moodleappbehat/tests/behat/behat_app.php b/local-moodleappbehat/tests/behat/behat_app.php index 45dbaec51..6422be3ef 100644 --- a/local-moodleappbehat/tests/behat/behat_app.php +++ b/local-moodleappbehat/tests/behat/behat_app.php @@ -681,7 +681,7 @@ class behat_app extends behat_app_helper { if (!is_null($urlpattern)) { $this->getSession()->switchToWindow($windowNames[1]); $windowurl = $this->getSession()->getCurrentUrl(); - $windowhaspattern = preg_match("/$urlpattern/", $windowurl); + $windowhaspattern = !!preg_match("/$urlpattern/", $windowurl); $this->getSession()->switchToWindow($windowNames[0]); if ($not === $windowhaspattern) {