MDL-78673 behat: Allow plugins to define their expansion of >

This commit is contained in:
Andrew Nicols
2023-07-10 09:52:46 +08:00
parent ef93325f27
commit 2b7daa3b28
+2 -2
View File
@@ -620,8 +620,8 @@ class behat_navigation extends behat_base {
$dividercount = substr_count($page, ' > ');
if ($dividercount === 0) {
return ['core', $page];
} else if ($dividercount === 1) {
list($component, $name) = explode(' > ', $page);
} else if ($dividercount >= 1) {
[$component, $name] = explode(' > ', $page, 2);
if ($component === 'core') {
throw new coding_exception('Do not specify the component "core > ..." for core pages.');
}