Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 11
Línea 43... Línea 43...
43
class provider_test extends provider_testcase {
43
class provider_test extends provider_testcase {
44
    /**
44
    /**
45
     * Test to check export_user_preferences.
45
     * Test to check export_user_preferences.
46
     * returns user preferences data.
46
     * returns user preferences data.
47
     */
47
     */
48
    public function test_export_user_preferences() {
48
    public function test_export_user_preferences(): void {
49
        $this->resetAfterTest();
49
        $this->resetAfterTest();
50
        $this->setAdminUser();
50
        $this->setAdminUser();
51
        $user = $this->getDataGenerator()->create_user();
51
        $user = $this->getDataGenerator()->create_user();
52
        $this->setUser($user);
52
        $this->setUser($user);
53
        $showadvanced = 1;
53
        $showadvanced = 1;
Línea 62... Línea 62...
62
    }
62
    }
Línea 63... Línea 63...
63
 
63
 
64
    /**
64
    /**
65
     * Check all contexts are returned if there is any user data for this user.
65
     * Check all contexts are returned if there is any user data for this user.
66
     */
66
     */
67
    public function test_get_contexts_for_userid() {
67
    public function test_get_contexts_for_userid(): void {
Línea 68... Línea 68...
68
        global $DB;
68
        global $DB;
69
 
69
 
70
        $this->resetAfterTest();
70
        $this->resetAfterTest();
Línea 112... Línea 112...
112
    }
112
    }
Línea 113... Línea 113...
113
 
113
 
114
    /**
114
    /**
115
     * Test that user data is exported correctly.
115
     * Test that user data is exported correctly.
116
     */
116
     */
117
    public function test_export_user_data() {
117
    public function test_export_user_data(): void {
Línea 118... Línea 118...
118
        global $DB;
118
        global $DB;
119
 
119
 
120
        $this->resetAfterTest();
120
        $this->resetAfterTest();
Línea 241... Línea 241...
241
    }
241
    }
Línea 242... Línea 242...
242
 
242
 
243
    /**
243
    /**
244
     * Test for provider::delete_data_for_all_users_in_context().
244
     * Test for provider::delete_data_for_all_users_in_context().
245
     */
245
     */
246
    public function test_delete_data_for_all_users_in_context() {
246
    public function test_delete_data_for_all_users_in_context(): void {
Línea 247... Línea 247...
247
        global $DB;
247
        global $DB;
248
 
248
 
249
        $this->resetAfterTest();
249
        $this->resetAfterTest();
Línea 327... Línea 327...
327
    }
327
    }
Línea 328... Línea 328...
328
 
328
 
329
    /**
329
    /**
330
     * Test for provider::delete_data_for_user().
330
     * Test for provider::delete_data_for_user().
331
     */
331
     */
332
    public function test_delete_data_for_user() {
332
    public function test_delete_data_for_user(): void {
Línea 333... Línea 333...
333
        global $DB;
333
        global $DB;
334
 
334
 
335
        $this->resetAfterTest();
335
        $this->resetAfterTest();
Línea 385... Línea 385...
385
    }
385
    }
Línea 386... Línea 386...
386
 
386
 
387
    /**
387
    /**
388
     * Export for a user with a key against a script where no instance is specified.
388
     * Export for a user with a key against a script where no instance is specified.
389
     */
389
     */
390
    public function test_export_user_role_to_cohort() {
390
    public function test_export_user_role_to_cohort(): void {
Línea 391... Línea 391...
391
        global $DB;
391
        global $DB;
392
 
392
 
393
        $this->resetAfterTest();
393
        $this->resetAfterTest();
Línea 441... Línea 441...
441
    }
441
    }
Línea 442... Línea 442...
442
 
442
 
443
    /**
443
    /**
444
     * Test for provider::delete_user_role_to_cohort().
444
     * Test for provider::delete_user_role_to_cohort().
445
     */
445
     */
446
    public function test_delete_user_role_to_cohort() {
446
    public function test_delete_user_role_to_cohort(): void {
Línea 447... Línea 447...
447
        global $DB;
447
        global $DB;
448
 
448
 
449
        $this->resetAfterTest();
449
        $this->resetAfterTest();
Línea 476... Línea 476...
476
    }
476
    }
Línea 477... Línea 477...
477
 
477
 
478
    /**
478
    /**
479
     * Test that only users within a course context are fetched.
479
     * Test that only users within a course context are fetched.
480
     */
480
     */
481
    public function test_get_users_in_context() {
481
    public function test_get_users_in_context(): void {
Línea 482... Línea 482...
482
        global $DB;
482
        global $DB;
Línea 483... Línea 483...
483
 
483
 
Línea 597... Línea 597...
597
    }
597
    }
Línea 598... Línea 598...
598
 
598
 
599
    /**
599
    /**
600
     * Test that data for users in approved userlist is deleted.
600
     * Test that data for users in approved userlist is deleted.
601
     */
601
     */
602
    public function test_delete_data_for_users() {
602
    public function test_delete_data_for_users(): void {
Línea 603... Línea 603...
603
        global $DB;
603
        global $DB;
Línea 604... Línea 604...
604
 
604