Skip to content

Commit

Permalink
Upgrade: Adopt changes from MDL-81960 and MDL-82183 in automated test…
Browse files Browse the repository at this point in the history
…s as well.
  • Loading branch information
abias committed Jan 8, 2025
1 parent 1933096 commit 8b41214
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
10 changes: 5 additions & 5 deletions tests/behat/behat_tool_directsso.php
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
}

Expand All @@ -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]);
}

Expand All @@ -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]);
}
Expand All @@ -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]);
}

Expand All @@ -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]);
}
Expand Down

0 comments on commit 8b41214

Please sign in to comment.