Skip to content
Permalink
Browse files

MDL-58761 behat: Fix regex in i_open_my_profile_in_edit_mode step

  • Loading branch information
gthomas2
gthomas2 committed Apr 29, 2017
1 parent 06e3b6d commit 770f0532effb6a175f1eb2385fc489ee6350e971
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/tests/behat/behat_navigation.php
@@ -539,7 +539,7 @@ public function i_open_my_profile_in_edit_mode() {
$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;

0 comments on commit 770f053

Please sign in to comment.
You can’t perform that action at this time.