diff --git a/lib/tests/behat/behat_navigation.php b/lib/tests/behat/behat_navigation.php index e2af345c530..8f4b805458c 100644 --- a/lib/tests/behat/behat_navigation.php +++ b/lib/tests/behat/behat_navigation.php @@ -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.'); }