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

This commit is contained in:
Andrew Nicols 2023-07-07 10:40:16 +08:00
parent f29f757f5f
commit e0c28bebcb
No known key found for this signature in database
GPG Key ID: 6D1E3157C8CFBF14

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.');
}