MDL-58761 behat: Fix regex in i_open_my_profile_in_edit_mode step

This commit is contained in:
gthomas2
2017-05-24 13:57:54 +01:00
parent 75528e9305
commit 3aed71750d
+1 -1
View 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;