From c461c96d25d4f3e6ae5b2863305b301615ccf83a Mon Sep 17 00:00:00 2001 From: "Eloy Lafuente (stronk7)" Date: Mon, 14 Oct 2019 23:52:28 +0200 Subject: [PATCH] MDL-66335 behat: Avoid double processing the page type resolve_page_instance_helper() already processes the type, returning the correct context that should be processing the navigation URL. With that extra call to parse_page_name() the 2nd call always returns "core", ultimately leading to tons of behat failures because "core" is not aware of those (plugin, quiz for now) pages typology. --- lib/tests/behat/behat_navigation.php | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/tests/behat/behat_navigation.php b/lib/tests/behat/behat_navigation.php index 12086f2c393..58abfafc836 100644 --- a/lib/tests/behat/behat_navigation.php +++ b/lib/tests/behat/behat_navigation.php @@ -629,7 +629,6 @@ class behat_navigation extends behat_base { * @throws Exception if the specified page cannot be determined. */ public function i_am_on_page_instance(string $identifier, string $type) { - list($component, $type) = $this->parse_page_name($type); $this->getSession()->visit($this->locate_path( $this->resolve_page_instance_helper($identifier, $type)->out_as_local_url())); }