diff --git a/CHANGES.md b/CHANGES.md index 194de00..e7cdbf6 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -4,6 +4,10 @@ moodle-tool_directsso Changes ------- +### Unreleased + +* 2025-01-08 - Upgrade: Adopt changes from MDL-81960 and MDL-82183 in automated tests as well. + ### v4.5-r1 * 2025-01-08 - Development: Rename master branch to main, please update your clones. diff --git a/tests/behat/behat_tool_directsso.php b/tests/behat/behat_tool_directsso.php index 244172f..8f64a22 100644 --- a/tests/behat/behat_tool_directsso.php +++ b/tests/behat/behat_tool_directsso.php @@ -169,7 +169,7 @@ public function i_go_to_the_login_page() { */ public function i_open_the_direct_sso_entrypoint_url_oauth2_dashboard() { $issuer = $this->get_oauth2_issuer_id(); - $url = new moodle_url('/admin/tool/directsso/login.php', ['auth' => 'oauth2', 'id' => $issuer, 'wantspage' => 'dashboard']); + $url = new \core\url('/admin/tool/directsso/login.php', ['auth' => 'oauth2', 'id' => $issuer, 'wantspage' => 'dashboard']); $this->execute('behat_general::i_visit', [$url]); } @@ -181,7 +181,7 @@ public function i_open_the_direct_sso_entrypoint_url_oauth2_dashboard() { */ public function i_open_the_direct_sso_entrypoint_url_oauth2_frontpage() { $issuer = $this->get_oauth2_issuer_id(); - $url = new moodle_url('/admin/tool/directsso/login.php', ['auth' => 'oauth2', 'id' => $issuer, 'wantspage' => 'frontpage']); + $url = new \core\url('/admin/tool/directsso/login.php', ['auth' => 'oauth2', 'id' => $issuer, 'wantspage' => 'frontpage']); $this->execute('behat_general::i_visit', [$url]); } @@ -194,7 +194,7 @@ public function i_open_the_direct_sso_entrypoint_url_oauth2_frontpage() { public function i_open_the_direct_sso_entrypoint_url_oauth2_course() { $issuer = $this->get_oauth2_issuer_id(); $courseid = $this->get_wantspage_course_id(); - $url = new moodle_url('/admin/tool/directsso/login.php', ['auth' => 'oauth2', 'id' => $issuer, 'wantspage' => 'course', + $url = new \core\url('/admin/tool/directsso/login.php', ['auth' => 'oauth2', 'id' => $issuer, 'wantspage' => 'course', 'courseid' => $courseid]); $this->execute('behat_general::i_visit', [$url]); } @@ -207,7 +207,7 @@ public function i_open_the_direct_sso_entrypoint_url_oauth2_course() { */ public function i_open_the_direct_sso_entrypoint_url_wrongauth_dashboard() { $issuer = $this->get_oauth2_issuer_id(); - $url = new moodle_url('/admin/tool/directsso/login.php', ['auth' => 'wrong', 'id' => $issuer, 'wantspage' => 'dashboard']); + $url = new \core\url('/admin/tool/directsso/login.php', ['auth' => 'wrong', 'id' => $issuer, 'wantspage' => 'dashboard']); $this->execute('behat_general::i_visit', [$url]); } @@ -220,7 +220,7 @@ public function i_open_the_direct_sso_entrypoint_url_wrongauth_dashboard() { public function i_open_the_direct_sso_entrypoint_url_oauth2_wrongcourse() { $issuer = $this->get_oauth2_issuer_id(); $courseid = $this->get_wantspage_course_id(); - $url = new moodle_url('/admin/tool/directsso/login.php', ['auth' => 'oauth2', 'id' => $issuer, 'wantspage' => 'course', + $url = new \core\url('/admin/tool/directsso/login.php', ['auth' => 'oauth2', 'id' => $issuer, 'wantspage' => 'course', 'courseid' => $courseid + 100]); $this->execute('behat_general::i_visit', [$url]); }