Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 11
Línea 46... Línea 46...
46
    }
46
    }
Línea 47... Línea 47...
47
 
47
 
48
    /**
48
    /**
49
     * Test getting the context for the user ID related to this plugin.
49
     * Test getting the context for the user ID related to this plugin.
50
     */
50
     */
51
    public function test_get_contexts_for_userid() {
51
    public function test_get_contexts_for_userid(): void {
52
        // Create user and RSS user keys.
52
        // Create user and RSS user keys.
53
        $user = $this->getDataGenerator()->create_user();
53
        $user = $this->getDataGenerator()->create_user();
54
        $context = \context_user::instance($user->id);
54
        $context = \context_user::instance($user->id);
Línea 59... Línea 59...
59
    }
59
    }
Línea 60... Línea 60...
60
 
60
 
61
    /**
61
    /**
62
     * Test that data is exported correctly for this plugin.
62
     * Test that data is exported correctly for this plugin.
63
     */
63
     */
64
    public function test_export_user_data() {
64
    public function test_export_user_data(): void {
Línea 65... Línea 65...
65
        global $DB;
65
        global $DB;
66
 
66
 
67
        // Create user and RSS user keys.
67
        // Create user and RSS user keys.
Línea 82... Línea 82...
82
    }
82
    }
Línea 83... Línea 83...
83
 
83
 
84
    /**
84
    /**
85
     * Test for provider::delete_data_for_all_users_in_context().
85
     * Test for provider::delete_data_for_all_users_in_context().
86
     */
86
     */
87
    public function test_delete_data_for_all_users_in_context() {
87
    public function test_delete_data_for_all_users_in_context(): void {
Línea 88... Línea 88...
88
        global $DB;
88
        global $DB;
89
 
89
 
90
        // Create user and RSS user keys.
90
        // Create user and RSS user keys.
Línea 106... Línea 106...
106
    }
106
    }
Línea 107... Línea 107...
107
 
107
 
108
    /**
108
    /**
109
     * Test for provider::delete_data_for_user().
109
     * Test for provider::delete_data_for_user().
110
     */
110
     */
111
    public function test_delete_data_for_user() {
111
    public function test_delete_data_for_user(): void {
Línea 112... Línea 112...
112
        global $DB;
112
        global $DB;
113
 
113
 
114
        // Create user and RSS user keys.
114
        // Create user and RSS user keys.
Línea 132... Línea 132...
132
    }
132
    }
Línea 133... Línea 133...
133
 
133
 
134
    /**
134
    /**
135
     * Test that only users with a user context are fetched.
135
     * Test that only users with a user context are fetched.
136
     */
136
     */
137
    public function test_get_users_in_context() {
137
    public function test_get_users_in_context(): void {
138
        $component = 'core_rss';
138
        $component = 'core_rss';
139
        // Create a user.
139
        // Create a user.
Línea 140... Línea 140...
140
        $user = $this->getDataGenerator()->create_user();
140
        $user = $this->getDataGenerator()->create_user();
Línea 162... Línea 162...
162
    }
162
    }
Línea 163... Línea 163...
163
 
163
 
164
    /**
164
    /**
165
     * Test that data for users in approved userlist is deleted.
165
     * Test that data for users in approved userlist is deleted.
166
     */
166
     */
167
    public function test_delete_data_for_users() {
167
    public function test_delete_data_for_users(): void {
168
        $component = 'core_rss';
168
        $component = 'core_rss';
169
        // Create a user1.
169
        // Create a user1.
170
        $user1 = $this->getDataGenerator()->create_user();
170
        $user1 = $this->getDataGenerator()->create_user();
171
        $usercontext1 = \context_user::instance($user1->id);
171
        $usercontext1 = \context_user::instance($user1->id);