Skip to content

Commit

Permalink
MDL-58761 behat: Fix regex in i_open_my_profile_in_edit_mode step
Browse files Browse the repository at this point in the history
  • Loading branch information
gthomas2 committed May 24, 2017
1 parent 06e3b6d commit 770f053
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/tests/behat/behat_navigation.php
Expand Up @@ -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;
Expand Down

0 comments on commit 770f053

Please sign in to comment.