mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
Merge branch 'MDL-70725-39' of git://github.com/sarjona/moodle into MOODLE_39_STABLE
This commit is contained in:
commit
853cbc5973
1 changed files with 11 additions and 3 deletions
|
@ -44,9 +44,6 @@ class core_oauth2_testcase extends advanced_testcase {
|
||||||
\core\oauth2\api::create_standard_issuer('microsoft');
|
\core\oauth2\api::create_standard_issuer('microsoft');
|
||||||
\core\oauth2\api::create_standard_issuer('nextcloud', 'https://dummy.local/nextcloud/');
|
\core\oauth2\api::create_standard_issuer('nextcloud', 'https://dummy.local/nextcloud/');
|
||||||
|
|
||||||
$this->expectException(\moodle_exception::class);
|
|
||||||
\core\oauth2\api::create_standard_issuer('nextcloud');
|
|
||||||
|
|
||||||
$issuers = \core\oauth2\api::get_all_issuers();
|
$issuers = \core\oauth2\api::get_all_issuers();
|
||||||
|
|
||||||
$this->assertEquals($issuers[0]->get('name'), 'Google');
|
$this->assertEquals($issuers[0]->get('name'), 'Google');
|
||||||
|
@ -72,6 +69,17 @@ class core_oauth2_testcase extends advanced_testcase {
|
||||||
$this->assertEquals($issuers[2]->get('name'), 'Nextcloud');
|
$this->assertEquals($issuers[2]->get('name'), 'Nextcloud');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Tests the crud operations on oauth2 issuers.
|
||||||
|
*/
|
||||||
|
public function test_create_nextcloud_without_url() {
|
||||||
|
$this->resetAfterTest();
|
||||||
|
$this->setAdminUser();
|
||||||
|
|
||||||
|
$this->expectException(\moodle_exception::class);
|
||||||
|
\core\oauth2\api::create_standard_issuer('nextcloud');
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests we can list and delete each of the persistents related to an issuer.
|
* Tests we can list and delete each of the persistents related to an issuer.
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue