Skip to content

Commit

Permalink
MDL-78673 behat: Allow plugins to define their expansion of >
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewnicols committed Jul 10, 2023
1 parent f748f6a commit 470ce4e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/tests/behat/behat_navigation.php
Expand Up @@ -604,8 +604,8 @@ protected function parse_page_name(string $page): array {
$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.');
}
Expand Down

0 comments on commit 470ce4e

Please sign in to comment.