Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 11
Línea 26... Línea 26...
26
class api_test extends \advanced_testcase {
26
class api_test extends \advanced_testcase {
Línea 27... Línea 27...
27
 
27
 
28
    /**
28
    /**
29
     * Test the cleaning of orphaned linked logins for all issuers.
29
     * Test the cleaning of orphaned linked logins for all issuers.
30
     */
30
     */
31
    public function test_clean_orphaned_linked_logins() {
31
    public function test_clean_orphaned_linked_logins(): void {
32
        $this->resetAfterTest();
32
        $this->resetAfterTest();
Línea 33... Línea 33...
33
        $this->setAdminUser();
33
        $this->setAdminUser();
34
 
34
 
Línea 56... Línea 56...
56
    }
56
    }
Línea 57... Línea 57...
57
 
57
 
58
    /**
58
    /**
59
     * Test the cleaning of orphaned linked logins for a specific issuer.
59
     * Test the cleaning of orphaned linked logins for a specific issuer.
60
     */
60
     */
61
    public function test_clean_orphaned_linked_logins_with_issuer_id() {
61
    public function test_clean_orphaned_linked_logins_with_issuer_id(): void {
62
        $this->resetAfterTest();
62
        $this->resetAfterTest();
Línea 63... Línea 63...
63
        $this->setAdminUser();
63
        $this->setAdminUser();
64
 
64
 
Línea 92... Línea 92...
92
     * Test creating a new confirmed account.
92
     * Test creating a new confirmed account.
93
     * Including testing that user profile fields are correctly set.
93
     * Including testing that user profile fields are correctly set.
94
     *
94
     *
95
     * @covers \auth_oauth2\api::create_new_confirmed_account
95
     * @covers \auth_oauth2\api::create_new_confirmed_account
96
     */
96
     */
97
    public function test_create_new_confirmed_account() {
97
    public function test_create_new_confirmed_account(): void {
98
        global $DB;
98
        global $DB;
99
        $this->resetAfterTest();
99
        $this->resetAfterTest();
100
        $this->setAdminUser();
100
        $this->setAdminUser();
Línea 101... Línea 101...
101
 
101
 
Línea 128... Línea 128...
128
    }
128
    }
Línea 129... Línea 129...
129
 
129
 
130
    /**
130
    /**
131
     * Test auto-confirming linked logins.
131
     * Test auto-confirming linked logins.
132
     */
132
     */
133
    public function test_linked_logins() {
133
    public function test_linked_logins(): void {
Línea 134... Línea 134...
134
        $this->resetAfterTest();
134
        $this->resetAfterTest();
135
 
135
 
Línea 170... Línea 170...
170
    }
170
    }
Línea 171... Línea 171...
171
 
171
 
172
    /**
172
    /**
173
     * Test that is_enabled correctly identifies when the plugin is enabled.
173
     * Test that is_enabled correctly identifies when the plugin is enabled.
174
     */
174
     */
175
    public function test_is_enabled() {
175
    public function test_is_enabled(): void {
Línea 176... Línea 176...
176
        $this->resetAfterTest();
176
        $this->resetAfterTest();
177
 
177
 
178
        set_config('auth', 'manual,oauth2');
178
        set_config('auth', 'manual,oauth2');
Línea 179... Línea 179...
179
        $this->assertTrue(\auth_oauth2\api::is_enabled());
179
        $this->assertTrue(\auth_oauth2\api::is_enabled());
180
    }
180
    }
181
 
181
 
182
    /**
182
    /**
183
     * Test that is_enabled correctly identifies when the plugin is disabled.
183
     * Test that is_enabled correctly identifies when the plugin is disabled.
Línea 184... Línea 184...
184
     */
184
     */
185
    public function test_is_enabled_disabled() {
185
    public function test_is_enabled_disabled(): void {
186
        $this->resetAfterTest();
186
        $this->resetAfterTest();
Línea 193... Línea 193...
193
     * Test creating a user via the send confirm account email method.
193
     * Test creating a user via the send confirm account email method.
194
     * Including testing that user profile fields are correctly set.
194
     * Including testing that user profile fields are correctly set.
195
     *
195
     *
196
     * @covers \auth_oauth2\api::send_confirm_account_email
196
     * @covers \auth_oauth2\api::send_confirm_account_email
197
     */
197
     */
198
    public function test_send_confirm_account_email() {
198
    public function test_send_confirm_account_email(): void {
199
        global $DB;
199
        global $DB;
200
        $this->resetAfterTest();
200
        $this->resetAfterTest();
201
        $this->setAdminUser();
201
        $this->setAdminUser();
Línea 202... Línea 202...
202
 
202