MDL-58761 behat: Fix regex in i_open_my_profile_in_edit_mode step
authorgthomas2 <gthomas@moodlerooms.com>
Sat, 29 Apr 2017 18:57:28 +0000 (19:57 +0100)
committergthomas2 <gthomas@moodlerooms.com>
Wed, 24 May 2017 12:54:49 +0000 (13:54 +0100)
lib/tests/behat/behat_navigation.php

index 0c27031..959459e 100644 (file)
@@ -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;