From 3aed71750d42e948475dc0252f1df3ba5bfea0e7 Mon Sep 17 00:00:00 2001 From: gthomas2 Date: Sat, 29 Apr 2017 19:57:28 +0100 Subject: [PATCH] MDL-58761 behat: Fix regex in i_open_my_profile_in_edit_mode step --- lib/tests/behat/behat_navigation.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tests/behat/behat_navigation.php b/lib/tests/behat/behat_navigation.php index 9460ebd4896..95c44b3dfb3 100644 --- a/lib/tests/behat/behat_navigation.php +++ b/lib/tests/behat/behat_navigation.php @@ -539,7 +539,7 @@ class behat_navigation extends behat_base { $bodynode = $this->find('xpath', 'body'); $bodyclass = $bodynode->getAttribute('class'); $matches = []; - if (preg_match('/(?<=^course-|\scourse-)\d/', $bodyclass, $matches) && !empty($matches)) { + if (preg_match('/(?<=^course-|\scourse-)\d+/', $bodyclass, $matches) && !empty($matches)) { $courseid = intval($matches[0]); } else { $courseid = SITEID;