Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 11
Línea 42... Línea 42...
42
class provider_test extends provider_testcase {
42
class provider_test extends provider_testcase {
Línea 43... Línea 43...
43
 
43
 
44
    /**
44
    /**
45
     * Ensure that export_user_preferences returns no data if the user has no data.
45
     * Ensure that export_user_preferences returns no data if the user has no data.
46
     */
46
     */
47
    public function test_export_user_preferences_not_defined() {
47
    public function test_export_user_preferences_not_defined(): void {
48
        $user = \core_user::get_user_by_username('admin');
48
        $user = \core_user::get_user_by_username('admin');
Línea 49... Línea 49...
49
        provider::export_user_preferences($user->id);
49
        provider::export_user_preferences($user->id);
50
 
50
 
51
        $writer = writer::with_context(\context_system::instance());
51
        $writer = writer::with_context(\context_system::instance());
Línea 52... Línea 52...
52
        $this->assertFalse($writer->has_any_data());
52
        $this->assertFalse($writer->has_any_data());
53
    }
53
    }
54
 
54
 
55
    /**
55
    /**
56
     * Ensure that export_user_preferences returns single preferences.
56
     * Ensure that export_user_preferences returns single preferences.
Línea 57... Línea 57...
57
     */
57
     */
58
    public function test_export_user_preferences() {
58
    public function test_export_user_preferences(): void {
59
        $this->resetAfterTest();
59
        $this->resetAfterTest();
Línea 81... Línea 81...
81
    }
81
    }
Línea 82... Línea 82...
82
 
82
 
83
    /**
83
    /**
84
     * Test the export of guide data.
84
     * Test the export of guide data.
85
     */
85
     */
86
    public function test_get_gradingform_export_data() {
86
    public function test_get_gradingform_export_data(): void {
87
        global $DB;
87
        global $DB;
88
        $this->resetAfterTest();
88
        $this->resetAfterTest();
89
        $course = $this->getDataGenerator()->create_course();
89
        $course = $this->getDataGenerator()->create_course();
90
        $module = $this->getDataGenerator()->create_module('assign', ['course' => $course]);
90
        $module = $this->getDataGenerator()->create_module('assign', ['course' => $course]);
Línea 119... Línea 119...
119
    }
119
    }
Línea 120... Línea 120...
120
 
120
 
121
    /**
121
    /**
122
     * Test the deletion of guide user information via the instance ID.
122
     * Test the deletion of guide user information via the instance ID.
123
     */
123
     */
124
    public function test_delete_gradingform_for_instances() {
124
    public function test_delete_gradingform_for_instances(): void {
125
        global $DB;
125
        global $DB;
126
        $this->resetAfterTest();
126
        $this->resetAfterTest();
127
        $course = $this->getDataGenerator()->create_course();
127
        $course = $this->getDataGenerator()->create_course();
128
        $module = $this->getDataGenerator()->create_module('assign', ['course' => $course]);
128
        $module = $this->getDataGenerator()->create_module('assign', ['course' => $course]);