MDL-58761 behat: Fix regex in i_open_my_profile_in_edit_mode step

This commit is contained in:
gthomas2
2017-05-24 13:54:49 +01:00
parent 06e3b6d8ba
commit 770f0532ef
+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;