Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 11
Línea 95... Línea 95...
95
    }
95
    }
Línea 96... Línea 96...
96
 
96
 
97
    /**
97
    /**
98
     * Test for provider::get_metadata()
98
     * Test for provider::get_metadata()
99
     */
99
     */
100
    public function test_get_metadata() {
100
    public function test_get_metadata(): void {
101
        $collection = new \core_privacy\local\metadata\collection('core_customfield');
101
        $collection = new \core_privacy\local\metadata\collection('core_customfield');
102
        $collection = provider::get_metadata($collection);
102
        $collection = provider::get_metadata($collection);
103
        $this->assertNotEmpty($collection);
103
        $this->assertNotEmpty($collection);
Línea 104... Línea 104...
104
    }
104
    }
105
 
105
 
106
    /**
106
    /**
107
     * Test for provider::get_customfields_data_contexts
107
     * Test for provider::get_customfields_data_contexts
108
     */
108
     */
109
    public function test_get_customfields_data_contexts() {
109
    public function test_get_customfields_data_contexts(): void {
110
        global $DB;
110
        global $DB;
111
        [
111
        [
112
            'cffields' => $cffields,
112
            'cffields' => $cffields,
Línea 123... Línea 123...
123
    }
123
    }
Línea 124... Línea 124...
124
 
124
 
125
    /**
125
    /**
126
     * Test for provider::get_customfields_configuration_contexts()
126
     * Test for provider::get_customfields_configuration_contexts()
127
     */
127
     */
128
    public function test_get_customfields_configuration_contexts() {
128
    public function test_get_customfields_configuration_contexts(): void {
Línea 129... Línea 129...
129
        $this->generate_test_data();
129
        $this->generate_test_data();
130
 
130
 
131
        $r = provider::get_customfields_configuration_contexts('core_course', 'course');
131
        $r = provider::get_customfields_configuration_contexts('core_course', 'course');
Línea 132... Línea 132...
132
        $this->assertEquals([\context_system::instance()->id], $r->get_contextids());
132
        $this->assertEquals([\context_system::instance()->id], $r->get_contextids());
133
    }
133
    }
134
 
134
 
135
    /**
135
    /**
136
     * Test for provider::export_customfields_data()
136
     * Test for provider::export_customfields_data()
137
     */
137
     */
138
    public function test_export_customfields_data() {
138
    public function test_export_customfields_data(): void {
139
        global $USER, $DB;
139
        global $USER, $DB;
140
        $this->resetAfterTest();
140
        $this->resetAfterTest();
Línea 175... Línea 175...
175
    }
175
    }
Línea 176... Línea 176...
176
 
176
 
177
    /**
177
    /**
178
     * Test for provider::delete_customfields_data()
178
     * Test for provider::delete_customfields_data()
179
     */
179
     */
180
    public function test_delete_customfields_data() {
180
    public function test_delete_customfields_data(): void {
181
        global $USER, $DB;
181
        global $USER, $DB;
182
        $this->resetAfterTest();
182
        $this->resetAfterTest();
183
        [
183
        [
184
            'cffields' => $cffields,
184
            'cffields' => $cffields,
Línea 193... Línea 193...
193
    }
193
    }
Línea 194... Línea 194...
194
 
194
 
195
    /**
195
    /**
196
     * Test for provider::delete_customfields_configuration()
196
     * Test for provider::delete_customfields_configuration()
197
     */
197
     */
198
    public function test_delete_customfields_configuration() {
198
    public function test_delete_customfields_configuration(): void {
199
        global $USER, $DB;
199
        global $USER, $DB;
200
        $this->resetAfterTest();
200
        $this->resetAfterTest();
201
        [
201
        [
202
            'cffields' => $cffields,
202
            'cffields' => $cffields,
Línea 230... Línea 230...
230
    }
230
    }
Línea 231... Línea 231...
231
 
231
 
232
    /**
232
    /**
233
     * Test for provider::delete_customfields_configuration_for_context()
233
     * Test for provider::delete_customfields_configuration_for_context()
234
     */
234
     */
235
    public function test_delete_customfields_configuration_for_context() {
235
    public function test_delete_customfields_configuration_for_context(): void {
236
        global $USER, $DB;
236
        global $USER, $DB;
237
        $this->resetAfterTest();
237
        $this->resetAfterTest();
238
        [
238
        [
239
            'cffields' => $cffields,
239
            'cffields' => $cffields,
Línea 267... Línea 267...
267
    }
267
    }
Línea 268... Línea 268...
268
 
268
 
269
    /**
269
    /**
270
     * Test for provider::delete_customfields_data_for_context()
270
     * Test for provider::delete_customfields_data_for_context()
271
     */
271
     */
272
    public function test_delete_customfields_data_for_context() {
272
    public function test_delete_customfields_data_for_context(): void {
273
        global $DB;
273
        global $DB;
274
        $this->resetAfterTest();
274
        $this->resetAfterTest();
275
        [
275
        [
276
            'cffields' => $cffields,
276
            'cffields' => $cffields,